public class DefaultProcessor extends Object implements MetadataProcessor, ServiceDocumentProcessor, ErrorProcessor
Processor implementation for handling default cases:
This implementation is registered in the ODataHandler by default. The default can be replaced by re-registering a custom implementation.
| Constructor and Description |
|---|
DefaultProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(OData odata,
ServiceMetadata serviceMetadata)
Initializes the processor for each HTTP request - response cycle.
|
void |
processError(ODataRequest request,
ODataResponse response,
ODataServerError serverError,
ContentType requestedContentType)
Processes an error/exception.
|
void |
readMetadata(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestedContentType)
Reads data from persistence and puts serialized content and status into the response.
|
void |
readServiceDocument(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestedContentType)
Reads service-document information from persistence and puts serialized content and status into the response.
|
public void init(OData odata, ServiceMetadata serviceMetadata)
Processorpublic void readServiceDocument(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, ODataLibraryException
ServiceDocumentProcessorreadServiceDocument in interface ServiceDocumentProcessorrequest - OData request object containing raw HTTP informationresponse - OData response object for collecting response datauriInfo - information of a parsed OData URIrequestedContentType - requested content type after content negotiationODataApplicationException - if the service implementation encounters a failureODataLibraryExceptionpublic void readMetadata(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, ODataLibraryException
MetadataProcessorreadMetadata in interface MetadataProcessorrequest - OData request object containing raw HTTP informationresponse - OData response object for collecting response datauriInfo - information of a parsed OData URIrequestedContentType - requested content type after content negotiationODataApplicationException - if the service implementation encounters a failureODataLibraryExceptionpublic void processError(ODataRequest request, ODataResponse response, ODataServerError serverError, ContentType requestedContentType)
ErrorProcessorprocessError in interface ErrorProcessorrequest - OData request object containing raw HTTP informationresponse - OData response object for collecting response dataserverError - the server errorrequestedContentType - requested content type after content negotiationCopyright © 2013–2023 The Apache Software Foundation. All rights reserved.