Package

io.jobial.scase

core

Permalink

package core

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

Type Members

  1. case class DefaultMessageReceiveResult[F[_], M](message: F[M], attributes: Map[String, String], consumer: Option[MessageConsumer[F, _ >: M]], commit: F[Unit], rollback: F[Unit], underlyingMessageProvided: F[Any], underlyingContextProvided: F[Any]) extends MessageReceiveResult[F, M] with Product with Serializable

    Permalink
  2. trait MessageConsumer[F[_], M] extends AnyRef

    Permalink

    The usual semantics of a consumer is that each message is delivered to exactly one receive or subscription.

    The usual semantics of a consumer is that each message is delivered to exactly one receive or subscription. Therefore, multiple subscriptions on a consumer receive messages randomly. If messages need to be delivered multiple times, each receiver should have a separate consumer.

  3. trait MessageContext[F[_]] extends AnyRef

    Permalink
  4. implicit class MessageExtension[F[_], M] extends AnyRef

    Permalink
  5. trait MessageHandler[F[_], M] extends AnyRef

    Permalink
  6. trait MessageProducer[F[_], M] extends AnyRef

    Permalink
  7. trait MessageReceiveResult[F[_], M] extends AnyRef

    Permalink
  8. trait MessageSendResult[F[_], M] extends AnyRef

    Permalink
  9. trait MessageSubscription[F[_], M] extends AnyRef

    Permalink
  10. case class ReceiveTimeout(timeout: Option[Duration], cause: Throwable) extends IllegalStateException with Product with Serializable

    Permalink
  11. trait ReceiverClient[F[_], M] extends AnyRef

    Permalink
  12. trait Request[RESPONSE] extends AnyRef

    Permalink

    Request[RESPONSE] cannot be covariant.

    Request[RESPONSE] cannot be covariant. This is easy to see because to enforce the response type, reply(...) must have an argument type of RESPONSE which would be impossible with a covariant type parameter (if it was covariant, it would be possible to assign a Request[SUBTYPE1] to a Request[SUPERTYPE] and then call reply with a SUBTYPE2 as the response, which would break type safety). The consequence of the invariance is that:

    1) reply(...) is type safe, which is good; 2) It is not possible to declare RequestResponseClient as RequestResponseClient[REQ <: Request[RESP], RESP] because that would assume covariance; 3) It is not possible to use something like Request[MyResponseType] as the common supertype for requests because that would assume covariance again - the solution is to use another supertype - e.g. declare a separate sealed trait MyRequestType to enforce type safety on the client and the consumers / producers - this is not a huge constraint though.

    This is all the consequence of the requirement to enforce type safety on the response for each request and also the fact that we want a common reply(...) method declared in the Request trait. The other option would be the Akka typed route, which is basically making a reply sender reference part of the request message. The downside of that is:

    1) A sender reference needs to be declared explicitly in every request message, making it part of the model; 2) The ask syntax is complicated and unintuitive - see https://doc.akka.io/docs/akka/current/typed/interaction-patterns.html#request-response; 3) Requires the existence of sender references with marshalling - this is fine in Akka where serializable references are assumed to be used everywhere, but it is quite intrusive if the application model is forced to have these references everywhere. I think extending the trait is less intrusive and less verbose.

    Of course, the choice of adding Request[RESPONSE] does not preclude the addition of an Akka-style API at some point if extending the trait will ever become a constraint.

  13. trait RequestContext[F[_]] extends AnyRef

    Permalink
  14. implicit class RequestExtension[F[_], REQUEST] extends AnyRef

    Permalink
  15. trait RequestHandler[F[_], REQ, RESP] extends AnyRef

    Permalink
  16. trait RequestResponseClient[F[_], REQ, RESP] extends AnyRef

    Permalink
  17. trait RequestResponseMapping[REQUEST, RESPONSE] extends AnyRef

    Permalink

    Type class to bind a request message type to a response type.

    Type class to bind a request message type to a response type. It makes request-response mapping pluggable, without enforcing any kind of convention on the implementor.

    Annotations
    @implicitNotFound( ... )
  18. trait RequestResponseResult[F[_], REQUEST, RESPONSE] extends AnyRef

    Permalink
  19. case class RequestTimeout(timeout: Duration, cause: Throwable) extends IllegalStateException with Product with Serializable

    Permalink
  20. case class SendMessageContext(attributes: Map[String, String] = Map()) extends Product with Serializable

    Permalink
  21. case class SendRequestContext(requestTimeout: Option[Duration] = None, attributes: Map[String, String] = Map()) extends Product with Serializable

    Permalink
  22. trait SendResponseResult[+RESP] extends AnyRef

    Permalink
  23. trait SenderClient[F[_], REQ] extends AnyRef

    Permalink
  24. trait Service[F[_]] extends AnyRef

    Permalink
  25. trait ServiceConfiguration extends AnyRef

    Permalink

    Configuration for a service.

    Configuration for a service. The service config can be used to create or deploy a service or to create a client for it. A service configuration can be shared between the server and client side.

  26. trait ServiceState[F[_]] extends AnyRef

    Permalink
  27. case class UnknownRequest[REQ](request: REQ) extends IllegalStateException with Product with Serializable

    Permalink
  28. implicit class requestResponseClientExtension[F[_], REQ, RESP] extends AnyRef

    Permalink
  29. implicit class requestTagBasedRequestResponseClientExtension[F[_], REQ, RESP] extends AnyRef

    Permalink

Value Members

  1. val CorrelationIdKey: String

    Permalink
  2. object MessageHandler

    Permalink
  3. object ReceiveTimeout extends Serializable

    Permalink
  4. object RequestHandler

    Permalink
  5. object RequestTimeout extends Serializable

    Permalink
  6. val RequestTimeoutKey: String

    Permalink
  7. val ResponseProducerIdKey: String

    Permalink
  8. val ResponseTopicKey: String

    Permalink
  9. package impl

    Permalink
  10. package javadsl

    Permalink
  11. implicit def requestResultToResponse[F[_], REQUEST, RESPONSE](requestResult: RequestResponseResult[F, REQUEST, RESPONSE]): F[RESPONSE]

    Permalink
  12. implicit def requestTagBasedRequestResponseMapping[REQUEST <: Request[_ <: RESPONSE], RESPONSE]: RequestResponseMapping[REQUEST, RESPONSE]

    Permalink
  13. implicit def sendRequest[F[_], REQUEST, RESPONSE](request: REQUEST)(implicit requestResponseMapping: RequestResponseMapping[REQUEST, RESPONSE], client: RequestResponseClient[F, _ >: REQUEST, _ >: RESPONSE], sendRequestContext: SendRequestContext = SendRequestContext(), M: Monad[F]): F[RESPONSE]

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped