org.apache.cayenne.configuration.rop.client

## Class ClientRuntimeBuilder

- java.lang.Object
- - org.apache.cayenne.configuration.rop.client.ClientRuntimeBuilder

-     public class ClientRuntimeBuilder
      extends Object

  A convenience class to assemble custom ClientRuntime. It allows to easily configure custom modules and create local runtime.

  To create this builder use `ClientRuntime.builder()` method.

  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientRuntimeBuilder` | `addModule(Module module)`
    `ClientRuntimeBuilder` | `addModules(Collection<Module> modules)`
    `ClientRuntime` | `build()`
    `ClientRuntimeBuilder` | `disableModulesAutoLoading()` Disables DI module auto-loading.
    `ClientRuntimeBuilder` | `local(Injector serverInjector)` Create `ClientRuntime` that provides an ROP stack based on a local connection on top of a server stack.
    `ClientRuntimeBuilder` | `properties(Map<String,String> properties)`

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

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

- - ### Method Detail

    - #### disableModulesAutoLoading

          public ClientRuntimeBuilder disableModulesAutoLoading()

      Disables DI module auto-loading. By default auto-loading is enabled based on `CayenneClientModuleProvider` service provider interface. If you decide to disable auto-loading, make sure you provide all the modules that you need.
      Returns:
        this builder instance.

    - #### addModule

          public ClientRuntimeBuilder addModule(Module module)

    - #### addModules

          public ClientRuntimeBuilder addModules(Collection<Module> modules)

    - #### properties

          public ClientRuntimeBuilder properties(Map<String,String> properties)

      Parameters:
        `properties` - contributed to `ServerModule`
      Returns:
        this builder

    - #### local

          public ClientRuntimeBuilder local(Injector serverInjector)

      Create `ClientRuntime` that provides an ROP stack based on a local connection on top of a server stack.
      Parameters:
        `serverInjector` - server injector
      Returns:
        this builder

    - #### build

          public ClientRuntime build()

Copyright © 2001–2021 Apache Cayenne. All rights reserved.