Class

com.typesafe.conductr.clientlib.scala

AbstractControlClient

Related Doc: package scala

Permalink

abstract class AbstractControlClient extends AnyRef

Abstract ConductR control client for all projects based on Scala.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractControlClient
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractControlClient(conductrAddress: URL)

    Permalink

    conductrAddress

    contains the protocol://host:port of the ConductR control server

Type Members

  1. class BasePayload extends AnyRef

    Permalink

    The BasePayload containing helper methods to create com.typesafe.conductr.HttpPayload objects for all given ControlClient endpoints.

    The BasePayload containing helper methods to create com.typesafe.conductr.HttpPayload objects for all given ControlClient endpoints.

    Attributes
    protected
  2. trait BaseResponseHandler extends AnyRef

    Permalink

    The BaseResponseHandler provides common methods to handle an HTTP responses from the ConductR control server.

    The BaseResponseHandler provides common methods to handle an HTTP responses from the ConductR control server.

    Attributes
    protected
  3. abstract type CC <: AbstractConnectionContext

    Permalink
    Attributes
    protected

Abstract Value Members

  1. abstract def downMember(address: URI)(implicit cc: CC): Future[Boolean]

    Permalink

    The current ConductR instance is downed for the given ConductR cluster.

    The current ConductR instance is downed for the given ConductR cluster. This method can be only used inside ConductR.

    address

    The uri representing the ConductR cluster member.

    cc

    implicit connection context

    returns

    true if the request has been succeeded. false if the request has been failed.

  2. abstract def getBundle(bundleId: BundleId, bundleData: Subscriber[Array[Byte]], configData: Subscriber[Array[Byte]])(implicit cc: CC): Future[BundleGetResult]

    Permalink

    Retrieve bundle file and bundle configuration file given a particular bundle id.

    Retrieve bundle file and bundle configuration file given a particular bundle id.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    bundleData

    A byte array subscriber to which the bundle data will be streamed into.

    configData

    A byte array subscriber to which the config data will be streamed into.

    cc

    implicit connection context

    returns

    The result as a Future[BundleGetResult]. BundleGetResult is a sealed trait and can be either:

    • BundleGetSuccess if the get bundle request has been succeeded. This object contains the bundle id, bundle file, and optionally the config file.
    • BundleGetFailure if the get bundle request has been failed. This object contains the HTTP status code and error message.
  3. abstract def getBundleEvents(bundleId: BundleId, count: Option[Int])(implicit cc: CC): Future[BundleEventsResult]

    Permalink

    Retrieve the events of a given bundle.

    Retrieve the events of a given bundle. Events with the latest timestamp are going to be returned in a 'tail' like fashion.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    count

    The number of events to return. Defaults to 10.

    cc

    implicit connection context

    returns

    The result as a Future[BundleEventsResult]. BundleEventsResult is a sealed trait and can be either:

    • BundleEventsSuccess if the request has been succeeded. This object contains the requested events.
    • BundleEventsFailure if the request has been failed. This object contains the HTTP status code and error message.
  4. abstract def getBundleLogs(bundleId: BundleId, count: Option[Int])(implicit cc: CC): Future[BundleLogsResult]

    Permalink

    Retrieve the log messages of a given bundle.

    Retrieve the log messages of a given bundle. Log messages with the latest timestamp are going to be returned in a 'tail' like fashion.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    count

    The number of events to return. Defaults to 10.

    cc

    implicit connection context

    returns

    The result as a Future[BundleLogsResult]. BundleEventsResult is a sealed trait and can be either:

    • BundleLogsSuccess if the request has been succeeded. This object contains the requested log messages.
    • BundleLogsFailure if the request has been failed. This object contains the HTTP status code and error message.
  5. abstract def getBundlesInfo()(implicit cc: CC): Future[Seq[Bundle]]

    Permalink

    Retrieve information of all bundles.

    Retrieve information of all bundles.

    cc

    implicit connection context

    returns

    the bundles

  6. abstract def getMemberInfo(address: URI)(implicit cc: CC): Future[MemberInfoResult]

    Permalink

    Retrieve the current state of a given ConductR cluster member.

    Retrieve the current state of a given ConductR cluster member.

    address

    The uri representing the ConductR cluster member.

    cc

    implicit connection context

    returns

    The result as a Future[MemberInfoResult]. MemberInfoResult is a sealed trait and can be either:

    • MemberInfoSuccess if the request has been succeeded. This object contains the requested ConductR cluster member.
    • MemberInfoFailure if the request has been failed. This object contains the HTTP status code and error message.
  7. abstract def getMembersInfo()(implicit cc: CC): Future[MembersInfoResult]

    Permalink

    Retrieve the current state of ConductR cluster members.

    Retrieve the current state of ConductR cluster members.

    cc

    implicit connection context

    returns

    the current ConductR cluster members.

  8. abstract def joinMember(joinTo: URI)(implicit cc: CC): Future[Boolean]

    Permalink

    The current ConductR instance joins the given ConductR cluster.

    The current ConductR instance joins the given ConductR cluster. This method can be only used inside ConductR.

    joinTo

    The uri representing the ConductR cluster member.

    cc

    implicit connection context

    returns

    true if the request has been succeeded. false if the request has been failed.

  9. abstract def leaveMember(address: URI)(implicit cc: CC): Future[Boolean]

    Permalink

    The current ConductR instance leaves the given ConductR cluster.

    The current ConductR instance leaves the given ConductR cluster. This method can be only used inside ConductR.

    address

    The uri representing the ConductR cluster member.

    cc

    implicit connection context

    returns

    true if the request has been succeeded. false if the request has been failed.

  10. abstract def loadBundle(bundleConf: Publisher[Array[Byte]], bundleConfOverlay: Option[Publisher[Array[Byte]]], bundle: BundleFile, config: Option[BundleConfigurationFile])(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Load a bundle with optional bundle conf override and optional configuration.

    Load a bundle with optional bundle conf override and optional configuration.

    bundleConf

    bundle.conf contained within the bundle file.

    bundleConfOverlay

    bundle.conf override contained within the config file.

    bundle

    The file that is the bundle. The filename is important with its hex digest string and is required to be consistent with the SHA-256 hash of the bundle’s contents. Any inconsistency between the hashes will result in the load being rejected.

    config

    Similar in form to the bundle, only that is the file that describes the configuration. Again any inconsistency between the hex digest string in the filename, and the SHA-256 digest of the actual contents will result in the load being rejected.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the loading request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the loading request has been failed. This object contains the HTTP status code and error message.
  11. abstract def loadBundleComplete(bundleConf: Publisher[Array[Byte]], bundleConfOverlay: Option[Publisher[Array[Byte]]], bundle: BundleFile, config: Option[BundleConfigurationFile], completeTimeout: FiniteDuration = 30.seconds)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Load a bundle with optional configuration and returns a future.

    Load a bundle with optional configuration and returns a future. If completeWhenInstalled is set to true, the future will be completed when the bundle is installed. Otherwise, the future is completed when the HTTP call to be control protocol is completed.

    bundle

    The file that is the bundle. The filename is important with its hex digest string and is required to be consistent with the SHA-256 hash of the bundle’s contents. Any inconsistency between the hashes will result in the load being rejected.

    config

    Optional: Similar in form to the bundle, only that is the file that describes the configuration. Again any inconsistency between the hex digest string in the filename, and the SHA-256 digest of the actual contents will result in the load being rejected.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the loading request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the loading request has been failed. This object contains the HTTP status code and error message.
  12. abstract def runBundle(bundleId: BundleId, scale: Option[Int], affinity: Option[String] = None)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Scale a loaded bundle to a number of instances.

    Scale a loaded bundle to a number of instances.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    scale

    The number of instances of the bundle to start. Defaults to 1.

    affinity

    Optional: Identifier to other bundle. If specified, the current bundle will be run on the same host where the specified bundle is currently running.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the scaling request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the scaling request has been failed. This object contains the HTTP status code and error message.
  13. abstract def runBundleComplete(bundleId: BundleId, scale: Option[Int] = None, affinity: Option[String] = None, completeTimeout: FiniteDuration = 30.seconds)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Scale a loaded bundle to a number of instances and returns a future.

    Scale a loaded bundle to a number of instances and returns a future. If completeWhenScaleAchieved is set to true, the future will be completed when the requested number of scale is achieved. Otherwise, the future is completed when the HTTP call to be control protocol is completed.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    scale

    The number of instances of the bundle to start. Defaults to 1.

    affinity

    Optional: Identifier to other bundle. If specified, the current bundle will be run on the same host where the specified bundle is currently running.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the scaling request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the scaling request has been failed. This object contains the HTTP status code and error message.
  14. abstract def stopBundle(bundleId: BundleId)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Stop a running bundle.

    Stop a running bundle. Requests for already stopped bundles will be send to the ConductR control server as well. In this case ConductR is ignoring the request.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the stopping request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the BundleRequestSuccess request has been failed. This object contains the HTTP status code and error message.
  15. abstract def unloadBundle(bundleId: BundleId)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Unload a bundle from all ConductR instances.

    Unload a bundle from all ConductR instances.

    bundleId

    An existing bundle identifier, a shortened version of it (min 7 characters) or a non-ambiguous name given to the bundle during loading.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the unloading request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the unloading request has been failed. This object contains the HTTP status code and error message.
  16. abstract def loadBundle(bundle: URI, config: Option[URI] = None)(implicit cc: CC): Future[BundleRequestResult]

    Permalink

    Load a bundle with optional configuration.

    Load a bundle with optional configuration.

    bundle

    The file that is the bundle. The filename is important with its hex digest string and is required to be consistent with the SHA-256 hash of the bundle’s contents. Any inconsistency between the hashes will result in the load being rejected.

    config

    Optional: Similar in form to the bundle, only that is the file that describes the configuration. Again any inconsistency between the hex digest string in the filename, and the SHA-256 digest of the actual contents will result in the load being rejected.

    cc

    implicit connection context

    returns

    The result as a Future[BundleRequestResult]. BundleRequestResult is a sealed trait and can be either:

    • BundleRequestSuccess if the loading request has been succeeded. This object contains the request and bundle id
    • BundleRequestFailure if the loading request has been failed. This object contains the HTTP status code and error message.
    Annotations
    @deprecated
    Deprecated

    (Since version 1.4.11) To be replaced with loadBundle with files supplied via reactive stream publishers

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped