Package

peds.akka

envelope

Permalink

package envelope

The enveloping package creates an envelope that carries a great deal more information than just the sender of the message. The envelope contains the following:

Importantly, all of this information to be supplied without burdening the code that sends the message. However, instead of the regular Akka tell and ! operations, programmers must use the send operation to wrap the message in a envelope.

someActor send SomeMessage( "Hello there, Mr. Actor" )
Linear Supertypes
StrictLogging, AskSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. envelope
  2. StrictLogging
  3. AskSupport
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait AskSupport extends AnyRef

    Permalink
  2. final class AskableEnvelopingActorRef extends AnyVal

    Permalink
  3. case class ComponentPath(path: String) extends Product with Serializable

    Permalink

    Defines the identity of the given component (e.g.

    Defines the identity of the given component (e.g. /path/to/MessageForwarder)

  4. case class ComponentType(componentType: String) extends Product with Serializable

    Permalink

    Defines the "type" of component in a message (e.g.

    Defines the "type" of component in a message (e.g. MessageForwarder)

  5. case class Envelope(payload: Any, header: EnvelopeHeader) extends Product with Serializable

    Permalink
  6. case class EnvelopeHeader(fromComponentType: ComponentType, fromComponentPath: ComponentPath, toComponentPath: ComponentPath, messageType: MessageType, workId: WorkId, messageNumber: MessageNumber, version: EnvelopeVersion, properties: Map[Symbol, Any] = Map(), createdTimeStamp: Long = System.currentTimeMillis) extends Product with Serializable

    Permalink
  7. implicit final class EnvelopeSending extends AnyVal

    Permalink

    This implementation is ported from Derek Wyatt's blog post Parts of this blog post are adapted here for documentation.

    This implementation is ported from Derek Wyatt's blog post Parts of this blog post are adapted here for documentation.

    EnvelopeSending is an implicit value type class that extends the functionality of the ActorRef to provide the hook that wrap messages inside a rich envelope containg meta data about the message.

    With this implicit class in scope, send(..) a message to an ActorRef will result in wrapping the message in an Envelope. send or sendForward must be used rather than the regular ActorRef's tell, forward, and ! methods, which will remain unwrapped with an envelope. It is easy to "drop" the envelope as a result, so as long as the envelope is important care should be taken to use the enveloping methods.

  8. case class EnvelopeVersion(version: Int = 1) extends Product with Serializable

    Permalink

    The version of the envelope protocol

  9. trait Enveloping extends AnyRef

    Permalink
  10. trait EnvelopingActor extends Actor with ActorStack with Enveloping

    Permalink
  11. case class MessageNumber(value: Long) extends Product with Serializable

    Permalink

    Defines the sequence number of this message within the workId

  12. case class MessageType(messageType: String) extends Product with Serializable

    Permalink

    Defines the type of message being sent (e.g.

    Defines the type of message being sent (e.g. SendEmail)

  13. case class WorkId(workId: ShortUUID = ShortUUID()) extends Product with Serializable

    Permalink

    Defines the work identifier that this message is part of

Value Members

  1. object ComponentPath extends Serializable

    Permalink
  2. object ComponentType extends Serializable

    Permalink
  3. object Envelope extends StrictLogging with Serializable

    Permalink
  4. object MessageNumber extends Serializable

    Permalink
  5. object MessageType extends Serializable

    Permalink
  6. object WorkId extends Serializable

    Permalink
  7. implicit def ask(actorRef: ActorRef): AskableEnvelopingActorRef

    Permalink
    Definition Classes
    AskSupport
  8. implicit val envelopeVersion: EnvelopeVersion

    Permalink

    Defines the envelope schema version number.

    Defines the envelope schema version number. We shouldn't have to supply this, generally, just pull it in from the implicit scope

  9. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StrictLogging
  10. val trace: Trace[Logger]

    Permalink

Inherited from StrictLogging

Inherited from AskSupport

Inherited from AnyRef

Inherited from Any

Ungrouped