Class SimpleMessage


public class SimpleMessage extends Message
Author:
havardpe
  • Constructor Details

    • SimpleMessage

      public SimpleMessage(String value)
  • Method Details

    • getType

      public int getType()
      Description copied from class: Routable
      Returns the type of this routable. The id '0' is reserved for the EmptyReply class. Other ids must be defined by the application protocol.
      Specified by:
      getType in class Routable
    • getProtocol

      public com.yahoo.text.Utf8String getProtocol()
      Description copied from class: Routable
      Return the name of the protocol that defines this routable. This must be implemented by all inheriting classes, and should then return the result of Protocol.getName() of its protocol.
      Specified by:
      getProtocol in class Routable
      Returns:
      the name of the protocol defining this message.
    • getApproxSize

      public int getApproxSize()
      Description copied from class: Message

      Obtain the approximate size of this message object in bytes. This enables messagebus to track the size of the send queue in both memory usage and item count. This method returns 1 by default, and must be overridden to enable message size tracking.

      Overrides:
      getApproxSize in class Message
      Returns:
      1
    • getValue

      public String getValue()
    • setValue

      public void setValue(String value)