org.apache.olingo.client.api

## Class ODataClientBuilder

- java.lang.Object
- - org.apache.olingo.client.api.ODataClientBuilder

-     public final class ODataClientBuilder
      extends Object

  Builder to create an ODataClient for the API client library. This builder is dependent that an according implementation for the ODataClient and or EdmEnabledODataClient is available in class path.

  This Builder should only be used in use cases were a direct access to the `client-core` library is not possible. If direct access is possible it is highly recommended to use the `ODataClientFactory` provided in the `client-core` library.

  By default the ODataClientBuilder use the default Olingo V4 client core implementations (`org.apache.olingo.client.core.ODataClientImpl` and `org.apache.olingo.client.core.EdmEnabledODataClientImpl`) which can be overwritten via the System properties `ODATA_CLIENT_IMPL_SYS_PROPERTY` and `ODATA_EMD_CLIENT_IMPL_SYS_PROPERTY`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ODataClientBuilder.ClientBuilder` Builder class

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ODATA_CLIENT_IMPL_SYS_PROPERTY`
    `static String` | `ODATA_EMD_CLIENT_IMPL_SYS_PROPERTY`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ODataClient` | `createClient()` Create an new ODataClient based on via system property ODATA_CLIENT_IMPL_SYS_PROPERTY class name or if not net the default ODATA_CLIENT_IMPL_CLASS set class.
    `static ODataClientBuilder.ClientBuilder` | `with(String serviceRoot)` Initiate the builder for an EdmEnabledODataClient.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### ODATA_CLIENT_IMPL_SYS_PROPERTY

          public static final String ODATA_CLIENT_IMPL_SYS_PROPERTY

      See Also:
        Constant Field Values

    - #### ODATA_EMD_CLIENT_IMPL_SYS_PROPERTY

          public static final String ODATA_EMD_CLIENT_IMPL_SYS_PROPERTY

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createClient

          public static ODataClient createClient()

      Create an new ODataClient based on via system property ODATA_CLIENT_IMPL_SYS_PROPERTY class name or if not net the default ODATA_CLIENT_IMPL_CLASS set class.
      Returns:
        create ODataClient

    - #### with

          public static ODataClientBuilder.ClientBuilder with(String serviceRoot)

      Initiate the builder for an EdmEnabledODataClient.
      Parameters:
        `serviceRoot` - service root to use
      Returns:
        initiated client builder

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.