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 actorSystem: 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. implicit val actorSystem: ActorSystem

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clientFor(location: HostLocation): Dispatch

    Permalink
    Attributes
    protected
  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    ExchangeClient → AutoCloseable
  9. 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
  10. 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
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected
  14. def finalize(): Unit

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

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    QueueObserver
  25. val logger: Logger

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  30. def onSubmitResponse(resp: BlockingSubmitJobResponse)(sendToWorker: (WorkerClient) ⇒ Future[HttpResponse]): WorkerResponses

    Permalink
    Attributes
    protected
    Definition Classes
    RoutingClient
  31. final def printer: Printer

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

    Permalink
    Definition Classes
    Exchange
  33. val rest: RestClient

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  39. def take(request: RequestWork): Future[RequestWorkAck]

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. 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