Class CarrierLoader

java.lang.Object
com.couchbase.client.core.config.loader.AbstractLoader
com.couchbase.client.core.config.loader.CarrierLoader
All Implemented Interfaces:
Loader

public class CarrierLoader
extends AbstractLoader
Loads a raw bucket configuration through the carrier mechanism (also commonly referred to as CCCP).
Since:
1.0
Author:
Michael Nitschinger
  • Constructor Details

    • CarrierLoader

      public CarrierLoader​(ClusterFacade cluster, CoreEnvironment environment)
      Creates a new CarrierLoader.
      Parameters:
      cluster - the cluster reference.
      environment - the environment to use.
  • Method Details

    • port

      protected int port​(String hostname)
      Description copied from class: AbstractLoader
      Port to use for the ServiceType. This method needs to be implemented by the actual loader and defines the port which should be used to connect the service to. In practice, the actual port may depend on the environment (i.e. if SSL is used or not).
      Specified by:
      port in class AbstractLoader
      Returns:
      the port for the service to enable.
    • discoverConfig

      protected rx.Observable<String> discoverConfig​(String bucket, String username, String password, String hostname)
      Description copied from class: AbstractLoader
      Run the BucketConfig discovery process.
      Specified by:
      discoverConfig in class AbstractLoader
      Parameters:
      bucket - the name of the bucket.
      username - user authorized for bucket access.
      password - the password of the user.
      hostname - the hostname of the seed node list.
      Returns:
      a raw config if discovered.