mot

protocol

package protocol

Package that contains the classes that represent Mot frames.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. protocol
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AttributesSupport extends AnyRef

    Frames that mix this trait can add a block of attributes.

    Frames that mix this trait can add a block of attributes. Attributes are a list of pairs of String and byte arrays.

  2. trait BodySupport extends AnyRef

    Frames that mix this trait can add a body, which is a byte array at the end of the frame.

  3. case class ByeFrame() extends Frame with Product with Serializable

    Empty frame that signals the normal finalization of a connection.

    Empty frame that signals the normal finalization of a connection. Nothing is sent or received after this frame.

  4. case class FlowControlFrame(flowId: Int, open: Boolean) extends Frame with Product with Serializable

    Frame sent by clients to open or close a flow.

    Frame sent by clients to open or close a flow.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    │0│                    Flow ID (31 bits)                        │
    ├─┼─┬─┬─┬─┬─┬─┬─┬───────────────────────────────────────────────╯
    │ Open (0 or 1) │
    ╰───────────────╯
    

    See also

    mot.ClientFlow

  5. trait Frame extends AnyRef

    Base trait for all protocol frames.

    Base trait for all protocol frames.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭─┬─┬─┬─┬─┬─┬─┬─╮
    │    Type (8)   │
    ├─┬─┬─┬─┬─┬─┬─┬─┼─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─╮
    │0│                 Message Length (31 bits)                    │
    ├─┴─────────────────────────────────────────────────────────────┤
    ╎                                                               ╎
    ╎                     Data (see sub types)                      ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  6. trait FrameFactory[+T <: Frame] extends AnyRef

  7. case class HeartbeatFrame() extends Frame with Product with Serializable

    Empty frame that keeps the connection with some activity when there are not other kind of frames.

    Empty frame that keeps the connection with some activity when there are not other kind of frames. The protocol mandates to send a heartbeat after 5 seconds of not sending anything.

  8. case class HelloFrame(attributes: Seq[(String, ByteArray)]) extends Frame with AttributesSupport with Product with Serializable

    First frame send by both parties in the beginning of every connection.

    First frame send by both parties in the beginning of every connection.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├───────────────────────────────────────────────────────────────┤
    ╎                                                               ╎
    ╎              Attributes (see AttributeSupport)                ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  9. case class MessageFrame(attributes: Seq[(String, ByteArray)], bodyLength: Int, body: Seq[ByteArray]) extends Frame with AttributesSupport with BodySupport with Product with Serializable

    Frame sent by clients, represents and unrespondible message.

    Frame sent by clients, represents and unrespondible message.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├───────────────────────────────────────────────────────────────┤
    ╎                                                               ╎
    ╎              Attributes (see AttributeSupport)                ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    ╎                                                               ╎
    ╎                    Body (see BodySupport)                     ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  10. trait ProtocolException extends Exception

  11. class ProtocolSemanticException extends Exception with ProtocolException

  12. trait ProtocolSyntaxException extends Exception with ProtocolException

  13. case class RequestFrame(requestId: Int, flowId: Int, timeout: Int, attributes: Seq[(String, ByteArray)], bodyLength: Int, body: Seq[ByteArray]) extends Frame with AttributesSupport with BodySupport with Product with Serializable

    Frame sent by clients.

    Frame sent by clients. Represents a respondible message.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    │0│                   Request ID (31 bits)                      │
    ├─┼─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    │0│                    Flow ID (31 bits)                        │
    ├─┼─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    │0│                    Timeout (31 bits)                        │
    ├─┴─────────────────────────────────────────────────────────────┤
    ╎                                                               ╎
    ╎              Attributes (see AttributeSupport)                ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    ╎                                                               ╎
    ╎                    Body (see BodySupport)                     ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  14. case class ResetFrame(error: String) extends Frame with BodySupport with Product with Serializable

    Frame that is sent in the event of an abnormal connection termination.

    Frame that is sent in the event of an abnormal connection termination. The body can have a reason. Nothing is sent or received after this frame.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    ╎                                                               ╎
    ╎                    Body (see BodySupport)                     ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  15. case class ResponseFrame(reference: Int, attributes: Seq[(String, ByteArray)], bodyLength: Int, body: Seq[ByteArray]) extends Frame with AttributesSupport with BodySupport with Product with Serializable

    Frame sent by servers to respond to messages.

    Frame sent by servers to respond to messages.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    ╭───────────────────────────────────────────────────────────────╮
    ╎                                                               ╎
    ╎                     Header (see Frame)                        ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    │0│                    Reference (31 bits)                      │
    ├─┴─────────────────────────────────────────────────────────────┤
    ╎                                                               ╎
    ╎              Attributes (see AttributeSupport)                ╎
    ╎                                                               ╎
    ├─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┤
    ╎                                                               ╎
    ╎                    Body (see BodySupport)                     ╎
    ╎                                                               ╎
    ╰───────────────────────────────────────────────────────────────╯
    

  16. case class UnknownFrame(messageType: Byte, length: Int) extends Frame with Product with Serializable

    Special frame type, which represents an unknown received frame.

    Special frame type, which represents an unknown received frame. It is never written.

Inherited from AnyRef

Inherited from Any

Ungrouped