Head

sealed trait Head[O] extends Stage
trait Stage
class Object
trait Matchable
class Any
trait HeadStage[O]
trait MidStage[I, O]
class SSLStage

Value members

Abstract methods

def readRequest(size: Int): Future[O]

Called by the next inbound Stage to signal interest in reading data.

Called by the next inbound Stage to signal interest in reading data.

Value Params
size

Hint as to the size of the message intended to be read. May not be meaningful or honored.

Returns

Future that will resolve with the requested inbound data, or an error.

def writeRequest(data: O): Future[Unit]

Data that the next inbound Stage wants to send outbound.

Data that the next inbound Stage wants to send outbound.

Returns

a Future that resolves when the data has been handled.

Concrete methods

final def findInboundStage(name: String): Option[Stage]

Find the next outbound Stage with the given name, if it exists.

Find the next outbound Stage with the given name, if it exists.

final def findInboundStage[C <: Stage](clazz: Class[C]): Option[C]

Find the next inbound Stage of type C, if it exists.

Find the next inbound Stage of type C, if it exists.

override def inboundCommand(cmd: InboundCommand): Unit

Receives inbound commands Override to capture commands.

Receives inbound commands Override to capture commands.

Definition Classes
final def replaceNext(stage: LeafBuilder[O], startup: Boolean): Tail[O]

Replace all remaining inbound Stages of the pipeline, not including this Stage.

Replace all remaining inbound Stages of the pipeline, not including this Stage.

final def sendInboundCommand(cmd: InboundCommand): Unit

Send a command to the next inbound Stage of the pipeline

Send a command to the next inbound Stage of the pipeline

final def spliceAfter(stage: MidStage[O, O]): Unit

Insert the MidStage after this

Insert the MidStage after this

def writeRequest(data: Seq[O]): Future[Unit]

Collection of data that the next inbound Stage wants to sent outbound.

Collection of data that the next inbound Stage wants to sent outbound.

It is generally assumed that the order of elements has meaning.

Returns

a Future that resolves when the data has been handled.

Inherited methods

def closePipeline(cause: Option[Throwable]): Unit
Inherited from
Stage
def name: String
Inherited from
Stage
protected def stageShutdown(): Unit

Shuts down the stage, deallocating resources, etc.

Shuts down the stage, deallocating resources, etc.

It will be called when the stage receives a Disconnected command unless inboundCommand is overridden. This method should not send or Disconnected commands.

It is possible that this will not be called due to failure of other stages to propagate shutdown commands. Conversely, it is also possible for this to be called more than once due to the reception of multiple shutdown commands. It is therefore recommended that the method be idempotent.

Inherited from
Stage
protected def stageStartup(): Unit

Start the stage, allocating resources etc.

Start the stage, allocating resources etc.

This method should not effect other stages by sending commands etc unless it creates them. It is not impossible that the stage will receive other commands besides Connected before this method is called. It is not impossible for this method to be called multiple times by misbehaving stages. It is therefore recommended that the method be idempotent.

Inherited from
Stage

Inherited fields

final protected val logger: Logger
Inherited from
Stage