org.apache.olingo.odata2.api
Class ODataServiceFactory

java.lang.Object
  extended by org.apache.olingo.odata2.api.ODataServiceFactory
Direct Known Subclasses:
AnnotationRefServiceFactory, ODataJPAServiceFactory, ScenarioServiceFactory

public abstract class ODataServiceFactory
extends Object

Creates instance of custom OData service.


Field Summary
static String FACTORY_CLASSLOADER_LABEL
          Label used in core to access application class loader
static String FACTORY_LABEL
          Label used in web.xml to assign servlet init parameter to factory class instance.
static String PATH_SPLIT_LABEL
          Label used in web.xml to assign servlet init parameter for a path split (service resolution).
 
Constructor Summary
ODataServiceFactory()
           
 
Method Summary
 ODataService createODataSingleProcessorService(EdmProvider provider, ODataSingleProcessor processor)
          Create a default service instance based on ODataSingleProcessor.
abstract  ODataService createService(ODataContext ctx)
          Create instance of custom ODataService.
<T extends ODataCallback>
T
getCallback(Class<? extends ODataCallback> callbackInterface)
          A service can return implementation classes for various callback interfaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FACTORY_LABEL

public static final String FACTORY_LABEL
Label used in web.xml to assign servlet init parameter to factory class instance.

See Also:
Constant Field Values

FACTORY_CLASSLOADER_LABEL

public static final String FACTORY_CLASSLOADER_LABEL
Label used in core to access application class loader

See Also:
Constant Field Values

PATH_SPLIT_LABEL

public static final String PATH_SPLIT_LABEL
Label used in web.xml to assign servlet init parameter for a path split (service resolution).

See Also:
Constant Field Values
Constructor Detail

ODataServiceFactory

public ODataServiceFactory()
Method Detail

createService

public abstract ODataService createService(ODataContext ctx)
                                    throws ODataException
Create instance of custom ODataService.

Parameters:
ctx - OData context object
Returns:
A new service instance.
Throws:
ODataException - in case of error

createODataSingleProcessorService

public ODataService createODataSingleProcessorService(EdmProvider provider,
                                                      ODataSingleProcessor processor)
Create a default service instance based on ODataSingleProcessor.

Parameters:
provider - A custom EdmProvider implementation.
processor - A custom processor implementation derived from ODataSingleProcessor .
Returns:
A new default ODataSingleProcessorService instance.

getCallback

public <T extends ODataCallback> T getCallback(Class<? extends ODataCallback> callbackInterface)
A service can return implementation classes for various callback interfaces.

Parameters:
callbackInterface - a interface type to query for implementation
Returns:
a callback implementation for this interface or null


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.