Class

jabroni.rest.worker

WorkContext

Related Doc: package worker

Permalink

case class WorkContext[T](exchange: Exchange, subscriptionKey: Option[SubscriptionKey], subscription: WorkSubscription, requestContext: RequestContext, request: T) extends Product with Serializable

Wraps the input to a computation, allowing the computation (mostly) to call 'take(n)' so it can request more work

T

the request type

exchange

the interface to an exchange so it can request more work or even cancel the subscription or return the job

subscription

the details of the subscription

request

the job input

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WorkContext
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new WorkContext(exchange: Exchange, subscriptionKey: Option[SubscriptionKey], subscription: WorkSubscription, requestContext: RequestContext, request: T)

    Permalink

    exchange

    the interface to an exchange so it can request more work or even cancel the subscription or return the job

    subscription

    the details of the subscription

    request

    the job input

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. def complete[T](compute: ⇒ T)(implicit arg0: ToResponseMarshaller[T]): Promise[HttpResponse]

    Permalink
  7. def completeWith(respFuture: Future[HttpResponse]): Promise[HttpResponse]

    Permalink
  8. def completeWithJson[A](value: A)(implicit enc: Encoder[A]): Promise[HttpResponse]

    Permalink
  9. def completeWithSource(dataSource: Source[ByteString, Any], contentType: ContentType = `application/octet-stream`): Promise[HttpResponse]

    Permalink
  10. def details: WorkerDetails

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. val exchange: Exchange

    Permalink

    the interface to an exchange so it can request more work or even cancel the subscription or return the job

  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. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val matchDetails: Option[MatchDetails]

    Permalink
  17. def multipartForFileName(fileName: String)(implicit ev: =:=[T, MultipartPieces]): Option[(MultipartInfo, Source[ByteString, Any])]

    Permalink

    returns

    the multipart details for the given file name, available only on multipart request inputs

  18. def multipartForKey(key: String)(implicit ev: =:=[T, MultipartPieces]): Option[(MultipartInfo, Source[ByteString, Any])]

    Permalink

    returns

    the multipart details for the given field (key), available only on multipart request inputs

  19. def multipartJson[A](implicit arg0: Decoder[A], arg1: ClassTag[A], ev: =:=[T, MultipartPieces]): Future[A]

    Permalink
  20. def multipartJson(key: String)(implicit ev: =:=[T, MultipartPieces]): Future[Json]

    Permalink
  21. def multipartKey[A](implicit arg0: Decoder[A], arg1: ClassTag[A]): String

    Permalink
  22. def multipartKeys(implicit ev: =:=[T, MultipartPieces]): Set[MultipartInfo]

    Permalink
  23. def multipartSavedTo(key: String, path: Path, openOptions: StandardOpenOption*)(implicit ev: =:=[T, MultipartPieces]): Future[IOResult]

    Permalink
  24. def multipartSource(key: String)(implicit ev: =:=[T, MultipartPieces]): Option[Source[ByteString, Any]]

    Permalink

    returns

    the multipart source bytes for the given field (key), available only on multipart request inputs

  25. def multipartText(key: String)(implicit ev: =:=[T, MultipartPieces]): Future[String]

    Permalink
  26. def multipartUpload(fileName: String)(implicit ev: =:=[T, MultipartPieces]): Option[Source[ByteString, Any]]

    Permalink

    returns

    the multipart source bytes for the given field (key), available only on multipart request inputs

  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 path: String

    Permalink
  31. def request(n: Int): Option[Future[RequestWorkAck]]

    Permalink

    n

    the number of work items to request (typically 1, as we take one for each one we compute)

    returns

    the Ack (if we indeed had a subscription key)

  32. val request: T

    Permalink

    the job input

  33. val requestContext: RequestContext

    Permalink
  34. def responseFuture: Future[HttpResponse]

    Permalink
  35. val resultPromise: Promise[HttpResponse]

    Permalink
  36. val subscription: WorkSubscription

    Permalink

    the details of the subscription

  37. val subscriptionKey: Option[SubscriptionKey]

    Permalink
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. final def wait(): Unit

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped