io.xtech.babel.fish

ChoiceDSL

Related Doc: package fish

class ChoiceDSL[I] extends BaseDSL[I]

A specific DSL for a choice block.

I

the body type of the input message.

Linear Supertypes
BaseDSL[I], DSL2BaseDSL[I], DSLEnricher, NoDSL, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ChoiceDSL
  2. BaseDSL
  3. DSL2BaseDSL
  4. DSLEnricher
  5. NoDSL
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ChoiceDSL(choice: ChoiceDefinition[I])(implicit arg0: ClassTag[I])

    choice

    the definition

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. implicit def addAStepToTheDSL[II](definition: StepDefinition)(implicit arg0: ClassTag[II]): BaseDSL[II]

    Attributes
    protected
    Definition Classes
    DSL2BaseDSL
  5. def aggregate[O](aggregation: AggregationConfiguration[I, O])(implicit arg0: ClassTag[O]): BaseDSL[O]

    Declare a a way to aggregate message.

    Declare a a way to aggregate message. The declaration is done with an object that implements the AggregateProps trait.

    O

    the type of the message pieces.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  6. def as[O](implicit arg0: ClassTag[O]): BaseDSL[O]

    Declares a type requirement in the route.

    Declares a type requirement in the route. if the body type is incorrect, the system tries to convert the message body.

    O

    the required type.

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. lazy val baseDsl: BaseDSL[I]

    Attributes
    protected
    Definition Classes
    BaseDSLDSL2BaseDSL
  9. def choice(block: (ChoiceDSL[I]) ⇒ Unit): BaseDSL[I]

    Declares a static router.

    Declares a static router. The routing conditions are declared inside a block using a specific DSL for the choice. The choice DSL contains two keywords : when and otherwise. When declares a subroute with a condition. Otherwise declare a subroute for messages that don't meet the conditions of the other When subroutes.

    choice{ c =>
        c.when(_.body == "1").endpoint("mock:output1")
        c.when(_.body == "2").endpoint("mock:output2")
        c.otherwise.endpoint("mock:output3")
    }
    block

    a function taking the routing DSL as a parameter and returning Unit.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  10. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  13. def filter(predicate: Predicate[I]): BaseDSL[I]

    Declares a filter in the route.

    Declares a filter in the route. If the condition of the predicate are not meet the routing of the current message is stopped.

    predicate

    if true the message continue the route

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  14. def filter(function: (Message[I]) ⇒ Boolean): BaseDSL[I]

    Declares a filter in the route.

    Declares a filter in the route. If the condition of the predicate are not meet the routing of the current message is stopped.

    function

    taking a message and returning a boolean. (true if the message continue otherwise false)

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  15. def filterBody(function: (I) ⇒ Boolean): BaseDSL[I]

    Adds a filter to the route with a predicate.

    Adds a filter to the route with a predicate. If the condition of the predicate are not meet the routing of the current message is stopped.

    function

    taking a message body and returning a boolean. (true if the message continue otherwise false)

    returns

    the main DSL

    Definition Classes
    BaseDSL
  16. def finalize(): Unit

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

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

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

    Definition Classes
    Any
  20. def multicast[S](sinks: S*)(implicit convert: (Seq[S]) ⇒ Seq[Sink[I, _]]): MulticastDSL[I]

    Declares a multicast in the route.

    Declares a multicast in the route. A multicast routes the same message to multiple endpoints.

    S

    the native type of the endpoints.

    sinks

    the endpoints.

    convert

    a way to convert the native type of the endpoints to sinks.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  21. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  24. def otherwise: BaseDSL[I]

    declares a default subroute if no other subroute handle a message.

    declares a default subroute if no other subroute handle a message.

    returns

    the possibility to add other steps to the current DSL

  25. def process[O](func: (Message[I]) ⇒ Message[O])(implicit arg0: ClassTag[O]): BaseDSL[O]

    Declares a transformation of the message in the route with a function.

    Declares a transformation of the message in the route with a function.

    O

    the type of the message if the body changed

    func

    the function

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  26. def processBody[O](func: (I) ⇒ O)(implicit arg0: ClassTag[O]): BaseDSL[O]

    Declares a transformation of the message body in the route with a function.

    Declares a transformation of the message body in the route with a function.

    O

    the output type of the function

    func

    the function

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  27. def requireAs[O](implicit arg0: ClassTag[O]): BaseDSL[O]

    Declares a type requirement in the route.

    Declares a type requirement in the route. if the type is incorrect an exception is thrown.

    O

    the required type.

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  28. def split[O](expression: Expression[I, O], stopOnException: Boolean = false, propagateException: Boolean = false)(implicit arg0: ClassTag[O]): SplitDSL[O]

    Declare a message splitter or a way to split a message body in pieces.

    Declare a message splitter or a way to split a message body in pieces.

    O

    the type of the message pieces.

    expression

    used to split the message.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  29. def split[O](splitter: (Message[I]) ⇒ Iterator[O])(implicit arg0: ClassTag[O]): SplitDSL[O]

    Declare a message splitter or a way to split a message body in pieces.

    Declare a message splitter or a way to split a message body in pieces.

    O

    the type of the message pieces.

    splitter

    the function used to split the message. It takes the message and returns an Iterator of the pieces.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  30. def splitBody[O](splitter: (I) ⇒ Iterator[O], stopOnException: Boolean = false, propagateException: Boolean = false)(implicit arg0: ClassTag[O]): SplitDSL[O]

    Declare a message splitter or a way to split a message body in pieces.

    Declare a message splitter or a way to split a message body in pieces.

    O

    the type of the message pieces.

    splitter

    the function used to split the body. It takes the body message and returns an Iterator of the pieces.

    returns

    the possibility to add other steps to the current DSL.

    Definition Classes
    BaseDSL
  31. def splitFoldBody[O, G, H](splitter: (I) ⇒ Iterator[O], stopOnException: Boolean = false, propagateException: Boolean = false)(splitterRoute: (BaseDSL[O]) ⇒ BaseDSL[G])(seed: H)(fold: (H, G) ⇒ H)(implicit arg0: ClassTag[O], arg1: ClassTag[H]): SplitDSL[H]

    Definition Classes
    BaseDSL
  32. def splitReduceBody[O, G](splitter: (I) ⇒ Iterator[O], stopOnException: Boolean = false, propagateException: Boolean = false)(splitterRoute: (BaseDSL[O]) ⇒ BaseDSL[G])(reduce: (G, G) ⇒ G)(implicit arg0: ClassTag[O], arg1: ClassTag[G]): SplitDSL[G]

    Definition Classes
    BaseDSL
  33. val step: StepDefinition

    the definition.

    the definition.

    Attributes
    protected[io.xtech.babel]
    Definition Classes
    BaseDSL
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def to[O, S](sink: S, requestReply: Boolean)(implicit arg0: ClassTag[O], convert: (S) ⇒ Sink[I, O]): BaseDSL[O]

    Declares an output for the route and defines incoming messages should require an answer or not.

    Declares an output for the route and defines incoming messages should require an answer or not.

    O

    the type of the output

    S

    a sink object

    sink

    an output.

    requestReply

    is true if the sender expects an answer.

    convert

    an object to route output (sink).

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  36. def to[O, S](sink: S)(implicit arg0: ClassTag[O], convert: (S) ⇒ Sink[I, O]): BaseDSL[O]

    Declares an output for the route.

    Declares an output for the route.

    O

    the type of the output

    S

    a sink object

    sink

    an output.

    convert

    an object to route output (sink).

    returns

    the possibility to add other steps to the current DSL

    Definition Classes
    BaseDSL
  37. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def when(predicate: Predicate[I]): BaseDSL[I]

    declares a possible subroute in the routing.

    declares a possible subroute in the routing.

    predicate

    if true the message go through the subroute.

    returns

    the possibility to add other steps to the current DSL

  42. def when(predicate: (Message[I]) ⇒ Boolean): BaseDSL[I]

    declares a possible subroute in the routing.

    declares a possible subroute in the routing.

    predicate

    a function taking a message returning a boolean. if true the message go through the subroute.

    returns

    the possibility to add other steps to the current DSL

  43. def whenBody(predicate: (I) ⇒ Boolean): BaseDSL[I]

    declares a possible subroute in the routing.

    declares a possible subroute in the routing.

    predicate

    a function taking a message body returning a boolean. if true the message go through the subroute.

    returns

    the base dsl.

Inherited from BaseDSL[I]

Inherited from DSL2BaseDSL[I]

Inherited from DSLEnricher

Inherited from NoDSL

Inherited from AnyRef

Inherited from Any

Ungrouped