Trait

org.http4s.blaze.pipeline.stages

ByteToObjectStage

Related Doc: package stages

Permalink

trait ByteToObjectStage[O] extends MidStage[ByteBuffer, O]

Linear Supertypes
MidStage[ByteBuffer, O], Head[O], Tail[ByteBuffer], Stage, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ByteToObjectStage
  2. MidStage
  3. Head
  4. Tail
  5. Stage
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def bufferToMessage(in: ByteBuffer): Option[O]

    Permalink

    Method that decodes ByteBuffers to objects.

    Method that decodes ByteBuffers to objects. None reflects not enough data to decode a message Any unused data in the ByteBuffer will be recycled and available for the next read.

    WARNING: don't count on the underlying array of the ByteBuffer. This uses the slice method, which could preserve access to the buffer, but mess with the various positions.

    in

    ByteBuffer of immediately available data

    returns

    optional message if enough data was available

  2. abstract val maxBufferSize: Int

    Permalink
  3. abstract def messageToBuffer(in: O): Seq[ByteBuffer]

    Permalink

    Encode objects to buffers

    Encode objects to buffers

    in

    object to decode

    returns

    sequence of ByteBuffers to pass to the head

  4. abstract def name: String

    Permalink
    Definition Classes
    Stage

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def channelRead(size: Int = 1, timeout: Duration = Duration.Inf): Future[ByteBuffer]

    Permalink
    Definition Classes
    Tail
  6. final def channelWrite(data: Seq[ByteBuffer], timeout: Duration): Future[Unit]

    Permalink
    Definition Classes
    Tail
  7. def channelWrite(data: Seq[ByteBuffer]): Future[Unit]

    Permalink
    Definition Classes
    Tail
  8. final def channelWrite(data: ByteBuffer, timeout: Duration): Future[Unit]

    Permalink
    Definition Classes
    Tail
  9. def channelWrite(data: ByteBuffer): Future[Unit]

    Permalink
    Definition Classes
    Tail
  10. def clone(): AnyRef

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def findInboundStage[C <: Stage](clazz: Class[C]): Option[C]

    Permalink
    Definition Classes
    Head
  15. final def findInboundStage(name: String): Option[Stage]

    Permalink
    Definition Classes
    Head
  16. final def findOutboundStage[C <: Stage](clazz: Class[C]): Option[C]

    Permalink
    Definition Classes
    Tail
  17. final def findOutboundStage(name: String): Option[Stage]

    Permalink
    Definition Classes
    Tail
  18. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def inboundCommand(cmd: InboundCommand): Unit

    Permalink

    Receives inbound commands Override to capture commands.

    Receives inbound commands Override to capture commands.

    cmd

    a command originating from the channel

    Definition Classes
    HeadStage
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. final val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Stage
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def outboundCommand(cmd: OutboundCommand): Unit

    Permalink

    Receives outbound commands Override to capture commands.

    Receives outbound commands Override to capture commands.

    Definition Classes
    MidStageHead
  27. def readRequest(size: Int): Future[O]

    Permalink
    Definition Classes
    ByteToObjectStageHead
  28. final def removeStage(implicit ev: =:=[MidStage[ByteBuffer, O], MidStage[ByteBuffer, ByteBuffer]]): Unit

    Permalink
    Definition Classes
    MidStage
  29. final def replaceInline(stage: MidStage[ByteBuffer, O]): ByteToObjectStage.this.type

    Permalink
    Definition Classes
    MidStage
  30. final def replaceInline(leafBuilder: LeafBuilder[ByteBuffer], startup: Boolean = true): ByteToObjectStage.this.type

    Permalink
    Definition Classes
    Tail
  31. final def replaceNext(stage: LeafBuilder[O]): Tail[O]

    Permalink
    Definition Classes
    MidStage
  32. final def sendInboundCommand(cmd: InboundCommand): Unit

    Permalink
    Definition Classes
    Head
  33. final def sendOutboundCommand(cmd: OutboundCommand): Unit

    Permalink
    Definition Classes
    Tail
  34. final def spliceAfter(stage: MidStage[O, O]): Unit

    Permalink
    Definition Classes
    Head
  35. final def spliceBefore(stage: MidStage[ByteBuffer, ByteBuffer]): Unit

    Permalink
    Definition Classes
    Tail
  36. def stageShutdown(): Unit

    Permalink

    Shuts down the stage, deallocating resources, etc.

    Shuts down the stage, deallocating resources, etc.

    This method will be called when the stages receives a Disconnected command unless the inboundCommand method is overridden. It is not impossible that this will not be called due to failure for 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 disconnect commands. It is therefore recommended that the method be idempotent.

    Attributes
    protected
    Definition Classes
    Stage
  37. def stageStartup(): Unit

    Permalink

    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.

    Attributes
    protected
    Definition Classes
    Stage
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def writeRequest(data: O): Future[Unit]

    Permalink
    Definition Classes
    ByteToObjectStageHead
  44. def writeRequest(data: Seq[O]): Future[Unit]

    Permalink

    A simple default that serializes the write requests into the single element form.

    A simple default that serializes the write requests into the single element form. It almost certainly should be overwritten

    data

    sequence of elements which are to be written

    returns

    Future which will resolve when pipeline is ready for more data or fails

    Definition Classes
    ByteToObjectStageHead

Inherited from MidStage[ByteBuffer, O]

Inherited from Head[O]

Inherited from Tail[ByteBuffer]

Inherited from Stage

Inherited from AnyRef

Inherited from Any

Ungrouped