Enum Class MessageType

java.lang.Object
java.lang.Enum<MessageType>
org.stellar.sdk.xdr.MessageType
All Implemented Interfaces:
Serializable, Comparable<MessageType>, Constable, XdrElement

public enum MessageType extends Enum<MessageType> implements XdrElement
MessageType's original definition in the XDR file is:
 enum MessageType
 {
     ERROR_MSG = 0,
     AUTH = 2,
     DONT_HAVE = 3,
     // GET_PEERS (4) is deprecated

     PEERS = 5,

     GET_TX_SET = 6, // gets a particular txset by hash
     TX_SET = 7,
     GENERALIZED_TX_SET = 17,

     TRANSACTION = 8, // pass on a tx you have heard about

     // SCP
     GET_SCP_QUORUMSET = 9,
     SCP_QUORUMSET = 10,
     SCP_MESSAGE = 11,
     GET_SCP_STATE = 12,

     // new messages
     HELLO = 13,

     // SURVEY_REQUEST (14) removed and replaced by TIME_SLICED_SURVEY_REQUEST
     // SURVEY_RESPONSE (15) removed and replaced by TIME_SLICED_SURVEY_RESPONSE

     SEND_MORE = 16,
     SEND_MORE_EXTENDED = 20,

     FLOOD_ADVERT = 18,
     FLOOD_DEMAND = 19,

     TIME_SLICED_SURVEY_REQUEST = 21,
     TIME_SLICED_SURVEY_RESPONSE = 22,
     TIME_SLICED_SURVEY_START_COLLECTING = 23,
     TIME_SLICED_SURVEY_STOP_COLLECTING = 24
 };
 
  • Enum Constant Details

    • ERROR_MSG

      public static final MessageType ERROR_MSG
    • AUTH

      public static final MessageType AUTH
    • DONT_HAVE

      public static final MessageType DONT_HAVE
    • PEERS

      public static final MessageType PEERS
    • GET_TX_SET

      public static final MessageType GET_TX_SET
    • TX_SET

      public static final MessageType TX_SET
    • GENERALIZED_TX_SET

      public static final MessageType GENERALIZED_TX_SET
    • TRANSACTION

      public static final MessageType TRANSACTION
    • GET_SCP_QUORUMSET

      public static final MessageType GET_SCP_QUORUMSET
    • SCP_QUORUMSET

      public static final MessageType SCP_QUORUMSET
    • SCP_MESSAGE

      public static final MessageType SCP_MESSAGE
    • GET_SCP_STATE

      public static final MessageType GET_SCP_STATE
    • HELLO

      public static final MessageType HELLO
    • SEND_MORE

      public static final MessageType SEND_MORE
    • SEND_MORE_EXTENDED

      public static final MessageType SEND_MORE_EXTENDED
    • FLOOD_ADVERT

      public static final MessageType FLOOD_ADVERT
    • FLOOD_DEMAND

      public static final MessageType FLOOD_DEMAND
    • TIME_SLICED_SURVEY_REQUEST

      public static final MessageType TIME_SLICED_SURVEY_REQUEST
    • TIME_SLICED_SURVEY_RESPONSE

      public static final MessageType TIME_SLICED_SURVEY_RESPONSE
    • TIME_SLICED_SURVEY_START_COLLECTING

      public static final MessageType TIME_SLICED_SURVEY_START_COLLECTING
    • TIME_SLICED_SURVEY_STOP_COLLECTING

      public static final MessageType TIME_SLICED_SURVEY_STOP_COLLECTING
  • Method Details

    • values

      public static MessageType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MessageType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • decode

      public static MessageType decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Specified by:
      encode in interface XdrElement
      Throws:
      IOException
    • fromXdrBase64

      public static MessageType fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static MessageType fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException