Class TcpReadWriteAdapter

  extended by akka.io.PipelineStage<PipelineContext,ByteString,Tcp.Command,ByteString,Tcp.Event>
      extended by akka.io.TcpReadWriteAdapter

public class TcpReadWriteAdapter
extends PipelineStage<PipelineContext,ByteString,Tcp.Command,ByteString,Tcp.Event>

Adapts a ByteString oriented pipeline stage to a stage that communicates via Tcp Commands and Events. Every ByteString passed down to this stage will be converted to Tcp.Write commands, while incoming Tcp.Receive events will be unwrapped and their contents passed up as raw ByteStrings. This adapter should be used together with TcpPipelineHandler.

While this adapter communicates to the stage above it via raw ByteStrings, it is possible to inject Tcp Command by sending them to the management port, and the adapter will simply pass them down to the stage below. Incoming Tcp Events that are not Receive events will be passed downwards wrapped in a TcpPipelineHandler.TcpEvent; the TcpPipelineHandler will send these notifications to the registered event handler actor.

Constructor Summary
Method Summary
 java.lang.Object apply(PipelineContext ctx)
Methods inherited from class akka.io.PipelineStage
combine, sequence
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TcpReadWriteAdapter()
Method Detail


public java.lang.Object apply(PipelineContext ctx)