org.apache.olingo.odata2.api

## Class ODataServiceFactory

- java.lang.Object
- - 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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ACCEPT_FORM_ENCODING` Label used in web.xml to assign servlet init parameter for a accept form encoding.
    `static String` | `FACTORY_CLASSLOADER_LABEL` Label used in core to access application class loader
    `static String` | `FACTORY_INSTANCE_LABEL` Label used in web.xml to assign servlet init parameter to factory class instance.
    `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

    Constructors
    Constructor and Description
    `ODataServiceFactory()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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<T> 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

    - #### FACTORY_INSTANCE_LABEL

          public static final String FACTORY_INSTANCE_LABEL

      Label used in web.xml to assign servlet init parameter to factory class instance.
      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

    - #### ACCEPT_FORM_ENCODING

          public static final String ACCEPT_FORM_ENCODING

      Label used in web.xml to assign servlet init parameter for a accept form encoding.
      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<T> 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-2022 The Apache Software Foundation. All Rights Reserved.