akka.io
Class PipelineSink<Cmd,Evt>

java.lang.Object
  extended by akka.io.PipelineSink<Cmd,Evt>

public abstract class PipelineSink<Cmd,Evt>
extends java.lang.Object

A sink which can be attached by PipelineFactory.buildWithSink(Ctx, akka.io.PipelineStage, akka.io.PipelineSink) to a pipeline when it is being built. The methods are called when commands, events or their failures occur during evaluation of the pipeline (i.e. when injection is triggered using the associated PipelineInjector).


Constructor Summary
PipelineSink()
           
 
Method Summary
 void onCommand(Cmd cmd)
          This callback is invoked for every command generated by the pipeline.
 void onCommandFailure(java.lang.Throwable thr)
          This callback is invoked if an exception occurred while processing an injected command.
 void onEvent(Evt event)
          This callback is invoked for every event generated by the pipeline.
 void onEventFailure(java.lang.Throwable thr)
          This callback is invoked if an exception occurred while processing an injected event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PipelineSink

public PipelineSink()
Method Detail

onCommand

public void onCommand(Cmd cmd)
This callback is invoked for every command generated by the pipeline.

By default this does nothing.


onCommandFailure

public void onCommandFailure(java.lang.Throwable thr)
This callback is invoked if an exception occurred while processing an injected command. If this callback is invoked that no other callbacks will be invoked for the same injection.

By default this will just throw the exception.


onEvent

public void onEvent(Evt event)
This callback is invoked for every event generated by the pipeline.

By default this does nothing.


onEventFailure

public void onEventFailure(java.lang.Throwable thr)
This callback is invoked if an exception occurred while processing an injected event. If this callback is invoked that no other callbacks will be invoked for the same injection.

By default this will just throw the exception.