Class/Object

jabroni.rest.exchange

ExchangeClient

Related Docs: object ExchangeClient | package exchange

Permalink

class ExchangeClient extends Exchange with QueueObserver with RoutingClient with FailFastCirceSupport with AutoCloseable with StrictLogging

Represents a something that will request work and get a response.

A normal workflow would be to request work from an exchange, have that work eventually matched with a worker, and then receive a 307 response, telling us where to go.

We then make a request (typically the original one, but perhaps not if it was e.g. a multipart request w/ a large upload or summat) to that worker.

Linear Supertypes
StrictLogging, AutoCloseable, FailFastCirceSupport, FailFastUnmarshaller, NoSpacesPrinter, BaseCirceSupport, RoutingClient, QueueObserver, Exchange, JobPublisher, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExchangeClient
  2. StrictLogging
  3. AutoCloseable
  4. FailFastCirceSupport
  5. FailFastUnmarshaller
  6. NoSpacesPrinter
  7. BaseCirceSupport
  8. RoutingClient
  9. QueueObserver
  10. Exchange
  11. JobPublisher
  12. AnyRef
  13. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExchangeClient(rest: RestClient)(implicit sys: ActorSystem, mat: Materializer)

    Permalink

Type Members

  1. type Dispatch = (String, MatchDetails, WorkerDetails) ⇒ WorkerClient

    Permalink
  2. type JobResponse = Future[_ <: ClientResponse]

    Permalink
  3. type WorkerCallback = (WorkerClient, WorkerDetails)

    Permalink
    Definition Classes
    RoutingClient
  4. type WorkerResponses = Future[CompletedWork]

    Permalink
    Definition Classes
    RoutingClient

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 clientFor(location: HostLocation): Dispatch

    Permalink
    Attributes
    protected
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def close(): Unit

    Permalink
    Definition Classes
    ExchangeClient → AutoCloseable
  8. def enqueue(submit: SubmitJob): WorkerResponses

    Permalink

    Similar to 'submit', but returns the result from the worker.

    Similar to 'submit', but returns the result from the worker.

    This assumes the job submitted to the exchange can be sent verbatim to the worker.

    The workflow is:

    1) submit to exchange, awaiting a match 2) on (redirect) response (when a worker is eventually assigned), submit the work to the matched worked 3) return the response from the worker ... which could be *anything*

    submit

    the job submission

    returns

    the worker response

    Definition Classes
    RoutingClient
  9. def enqueueAndDispatch(submit: SubmitJob)(doWork: (WorkerClient) ⇒ Future[HttpResponse]): (JobResponse, WorkerResponses)

    Permalink

    Enqueues the given job, then uses the supplied function to send the matched work to the workers

    Enqueues the given job, then uses the supplied function to send the matched work to the workers

    Definition Classes
    RoutingClient
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. implicit def execContext: ExecutionContextExecutor

    Permalink
    Attributes
    protected
  13. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def haveAMaterializer: Materializer

    Permalink
    Attributes
    protected
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. implicit final val jsonMarshaller: ToEntityMarshaller[Json]

    Permalink
    Definition Classes
    BaseCirceSupport
  19. implicit final val jsonUnmarshaller: FromEntityUnmarshaller[Json]

    Permalink
    Definition Classes
    BaseCirceSupport
  20. def listJobs(request: QueuedJobs): Future[QueuedJobsResponse]

    Permalink
    Definition Classes
    ExchangeClient → QueueObserver
  21. final def listJobs(): Future[QueuedJobsResponse]

    Permalink
    Definition Classes
    QueueObserver
  22. def listSubscriptions(request: ListSubscriptions): Future[ListSubscriptionsResponse]

    Permalink
    Definition Classes
    ExchangeClient → QueueObserver
  23. final def listSubscriptions(): Future[ListSubscriptionsResponse]

    Permalink
    Definition Classes
    QueueObserver
  24. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  25. implicit final def marshaller[A](implicit arg0: Encoder[A]): ToEntityMarshaller[A]

    Permalink
    Definition Classes
    BaseCirceSupport
  26. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  29. final def printer: Printer

    Permalink
    Definition Classes
    NoSpacesPrinter
  30. def pull(req: SubscriptionRequest): Future[SubscriptionResponse]

    Permalink
    Definition Classes
    Exchange
  31. val rest: RestClient

    Permalink
  32. def send(request: ClientRequest): Future[ClientResponse]

    Permalink
    Definition Classes
    JobPublisher
  33. def sendAndRouteWorkerRequest(submit: SubmitJob)(sendToWorker: (WorkerClient) ⇒ Future[HttpResponse]): (JobResponse, WorkerResponses)

    Permalink
    Definition Classes
    RoutingClient
  34. def submit(submit: SubmitJob): JobResponse

    Permalink
    Definition Classes
    ExchangeClient → JobPublisher
  35. def subscribe(request: WorkSubscription): Future[WorkSubscriptionAck]

    Permalink
    Definition Classes
    ExchangeClient → Exchange
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  37. implicit val sys: ActorSystem

    Permalink
  38. def take(request: RequestWork): Future[RequestWorkAck]

    Permalink
    Definition Classes
    ExchangeClient → Exchange
  39. def take(id: SubscriptionKey, itemsRequested: Int): Future[RequestWorkAck]

    Permalink
    Definition Classes
    Exchange
  40. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  41. implicit final def unmarshaller[A](implicit arg0: Decoder[A]): FromEntityUnmarshaller[A]

    Permalink
    Definition Classes
    FailFastUnmarshaller
  42. final def wait(): Unit

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

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

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

Inherited from StrictLogging

Inherited from AutoCloseable

Inherited from FailFastCirceSupport

Inherited from FailFastUnmarshaller

Inherited from NoSpacesPrinter

Inherited from BaseCirceSupport

Inherited from RoutingClient

Inherited from QueueObserver

Inherited from Exchange

Inherited from JobPublisher

Inherited from AnyRef

Inherited from Any

Ungrouped