Package convex.net

Enum Class MessageType

All Implemented Interfaces:
Serializable, Comparable<MessageType>, Constable

public enum MessageType extends Enum<MessageType>
  • Enum Constant Details

    • CHALLENGE

      public static final MessageType CHALLENGE
      A message that requests the remote endpoint to respond with a signed response. The challenge must be signed to authenticate the challenger. The challenge is sent with a vector of [hash accountKey-of-the-challenged]
    • RESPONSE

      public static final MessageType RESPONSE
      A response to a challenge. The challengee must sign the response as proof of possession of the claimed address.
    • DATA

      public static final MessageType DATA
      A message relaying data. Data is presented "as-is", and may be: - the result of a missing data request - data sent ahead of another message requiring composite data
    • COMMAND

      public static final MessageType COMMAND
      A control command to a peer. Should only be accepted and acted upon when originating from trusted, authenticated senders.
    • MISSING_DATA

      public static final MessageType MISSING_DATA
      A request to provide missing data. Peers should not send this message unless both: a) they are unable to locate the given data in their local store b) They have reason to believe the targeted peer may be able to provide it Excessive invalid missing data requests may be considered a DoS attack by peers. Peers under load may need to ignore missing data requests. Payload is the missing data hash. Receiver should respond with a DATA message if the specified data is available in their store.
    • QUERY

      public static final MessageType QUERY
      A request to perform the specified query and return results. Payload is: [id form address?] Receiver may may determine policies regarding whether to accept or reject queries, typically receiver will want to authenticate the sender and ensure good standing?
    • TRANSACT

      public static final MessageType TRANSACT
      A message requesting a transaction be performed by the receiving peer and included in the next available block. Payload is: [id signed-data]
    • RESULT

      public static final MessageType RESULT
      Message containing the result for a corresponding COMMAND, QUERY or TRANSACT message. Payload is: [id result error-flag] Where: - Result is the result of the request, or the message if an error occurred - error-flag is nil if the transaction succeeded, or error code if it failed
    • BELIEF

      public static final MessageType BELIEF
      Communication of a latest Belief by a Peer. Payload is a SignedData
    • GOODBYE

      public static final MessageType GOODBYE
      Communication of an intention to shutdown.
    • STATUS

      public static final MessageType STATUS
      Request for a peer status update. Payload is the message ID as a Long. Expected Result is a Vector: [signed-belief-hash states-hash initial-state-hash peer-key consensus-state-hash]
  • 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
    • getMessageCode

      public byte getMessageCode()
    • decode

      public static MessageType decode(int i) throws BadFormatException
      Throws:
      BadFormatException