|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.io.PipelineStage<Context,CmdAbove,CmdBelow,EvtAbove,EvtBelow>
public abstract class PipelineStage<Context extends PipelineContext,CmdAbove,CmdBelow,EvtAbove,EvtBelow>
A pipeline stage which can be combined with other stages to build a
protocol stack. The main function of this class is to serve as a factory
for the actual PipePair
generated by the apply(Context)
method so that a
context object can be passed in.
PipelineFactory
Constructor Summary | |
---|---|
PipelineStage()
|
Method Summary | ||
---|---|---|
protected abstract PipePair<CmdAbove,CmdBelow,EvtAbove,EvtBelow> |
apply(Context ctx)
Implement this method to generate this stage’s pair of command and event functions. |
|
static
|
combine(PipelineStage<Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> left,
PipelineStage<Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> right)
Java API: combine the two stages such that the command pipeline of the left stage is used and the event pipeline of the right, discarding the other two sub-pipelines. |
|
static
|
sequence(PipelineStage<? super Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> left,
PipelineStage<? super Ctx,CmdBelow,CmdBelowBelow,EvtBelow,EvtBelowBelow> right)
Java API: attach the two given stages such that the command output of the first is fed into the command input of the second, and the event output of the second is fed into the event input of the first. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PipelineStage()
Method Detail |
---|
public static <Ctx extends PipelineContext,CmdAbove,CmdBelow,CmdBelowBelow,EvtAbove,EvtBelow,EvtBelowBelow> PipelineStage<Ctx,CmdAbove,CmdBelowBelow,EvtAbove,EvtBelowBelow> sequence(PipelineStage<? super Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> left, PipelineStage<? super Ctx,CmdBelow,CmdBelowBelow,EvtBelow,EvtBelowBelow> right)
left
- the left or upper pipeline stageright
- the right or lower pipeline stage
public static <Ctx extends PipelineContext,CmdAbove,CmdBelow,EvtAbove,EvtBelow> PipelineStage<Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> combine(PipelineStage<Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> left, PipelineStage<Ctx,CmdAbove,CmdBelow,EvtAbove,EvtBelow> right)
left
- the command pipelineright
- the event pipeline
protected abstract PipePair<CmdAbove,CmdBelow,EvtAbove,EvtBelow> apply(Context ctx)
INTERNAL API: do not use this method to instantiate a pipeline!
PipelineFactory
,
AbstractPipePair
,
AbstractSymmetricPipePair
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |