io.xtech.babel.fish.model

Message

Related Doc: package model

trait Message[+T] extends AnyRef

A message passing through a route. It is immutable and all changes create a new message.

T

the type of the body.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Message
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def body: Option[T]

    Returns the body message.

  2. abstract def bodyAs[A](implicit arg0: ClassTag[A]): Option[A]

    Returns the body converted to a new type.

    Returns the body converted to a new type.

    A

    the new type.

    returns

    the converted body.

  3. abstract def headers: Map[String, Any]

    Returns an immutable Map of all headers in this message.

    Returns an immutable Map of all headers in this message.

    returns

    an immutable Map with all the headers.

  4. abstract def withBody[O](f: (T) ⇒ O)(implicit arg0: ClassTag[O]): Message[O]

    Changes the body message with a function.

    Changes the body message with a function. This method requires a body.

    O

    the type taken by the body after the change.

    f

    the function that process the body.

    returns

    a new message with the new body.

  5. abstract def withHeader(key: String, value: Any): Message[T]

    Creates or updates a header in the message.

    Creates or updates a header in the message.

    key

    the key.

    value

    the value.

    returns

    a new Message with the new header.

  6. abstract def withHeaders(f: (Map[String, Any]) ⇒ Map[String, Any]): Message[T]

    Changes the message headers with a function.

    Changes the message headers with a function.

    f

    a function processing the headers of the message.

    returns

    a new Message with modified headers.

  7. abstract def withOptionalBody[O](f: (Option[T]) ⇒ Option[O])(implicit arg0: ClassTag[O]): Message[O]

    Changes the body message with a function.

    Changes the body message with a function. This method let you handle the case when the body don't exist.

    O

    the type taken by the body after the change.

    f

    the function that process the body.

    returns

    a new message with the new body.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  16. def toString(): String

    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped