Package com.io7m.cedarbridge.runtime.container_protocol

# Class CBContainerProtocolMessages

java.lang.Object
com.io7m.cedarbridge.runtime.container_protocol.CBContainerProtocolMessages

public final class CBContainerProtocolMessages extends Object
Functions to parse and serialize versioning container protocol messages.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static CBContainerProtocolAvailable`
  `parseAvailable(byte[] data)`
  Parse an "available" message.
  `static CBContainerProtocolAvailable`
  `parseAvailable(ByteBuffer data)`
  Parse an "available" message.
  `static CBContainerProtocolResponse`
  `parseResponse(byte[] data)`
  Parse a "response" message.
  `static CBContainerProtocolResponse`
  `parseResponse(ByteBuffer data)`
  Parse a "response" message.
  `static CBContainerProtocolUse`
  `parseUse(byte[] data)`
  Parse a "use" message.
  `static CBContainerProtocolUse`
  `parseUse(ByteBuffer data)`
  Parse a "use" message.
  `static ByteBuffer`
  `serializeAvailable(CBContainerProtocolAvailable message)`
  Serialize an "available" message.
  `static byte[]`
  `serializeAvailableAsBytes(CBContainerProtocolAvailable message)`
  Serialize an "available" message.
  `static ByteBuffer`
  `serializeResponse(CBContainerProtocolResponse message)`
  Serialize a "response" message.
  `static byte[]`
  `serializeResponseAsBytes(CBContainerProtocolResponse message)`
  Serialize a "response" message.
  `static ByteBuffer`
  `serializeUse(CBContainerProtocolUse message)`
  Serialize a "use" message.
  `static byte[]`
  `serializeUseAsBytes(CBContainerProtocolUse message)`
  Serialize a "use" message.
  `static int`
  `sizeAvailable()`
  `static int`
  `sizeResponse()`
  `static int`
  `sizeUse()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### parseAvailable

    public static CBContainerProtocolAvailable parseAvailable(byte[] data)
    Parse an "available" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### parseAvailable

    public static CBContainerProtocolAvailable parseAvailable(ByteBuffer data)
    Parse an "available" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### parseUse

    public static CBContainerProtocolUse parseUse(ByteBuffer data)
    Parse a "use" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### parseUse

    public static CBContainerProtocolUse parseUse(byte[] data)
    Parse a "use" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### parseResponse

    public static CBContainerProtocolResponse parseResponse(ByteBuffer data)
    Parse a "response" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### parseResponse

    public static CBContainerProtocolResponse parseResponse(byte[] data)
    Parse a "response" message.
    Parameters:
      `data` - The message data
    Returns:
      A parsed message

  - ### sizeResponse

    public static int sizeResponse()
    Returns:
      The size of a response message

  - ### serializeResponse

    public static ByteBuffer serializeResponse(CBContainerProtocolResponse message)
    Serialize a "response" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message

  - ### serializeResponseAsBytes

    public static byte[] serializeResponseAsBytes(CBContainerProtocolResponse message)
    Serialize a "response" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message

  - ### serializeUse

    public static ByteBuffer serializeUse(CBContainerProtocolUse message)
    Serialize a "use" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message

  - ### serializeUseAsBytes

    public static byte[] serializeUseAsBytes(CBContainerProtocolUse message)
    Serialize a "use" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message

  - ### sizeUse

    public static int sizeUse()
    Returns:
      The size of a "use" message

  - ### serializeAvailable

    public static ByteBuffer serializeAvailable(CBContainerProtocolAvailable message)
    Serialize an "available" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message

  - ### sizeAvailable

    public static int sizeAvailable()
    Returns:
      The size of an "available" message

  - ### serializeAvailableAsBytes

    public static byte[] serializeAvailableAsBytes(CBContainerProtocolAvailable message)
    Serialize an "available" message.
    Parameters:
      `message` - The message
    Returns:
      A serialized message