Package convex.net
Class Message
java.lang.Object
convex.net.Message
Class representing a message to / from a specific PeerConnection
This class is an immutable data structure, but NOT a representable on-chain data structure, as it is part of the peer protocol layer.
Messages may contain a Payload, which can be any Data Object.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Message
create(Connection peerConnection, ACell o)
static Message
create(Connection peerConnection, MessageType type, ACell payload)
static Message
createBelief(SignedData<Belief> sb)
static Message
createChallenge(SignedData<ACell> challenge)
static Message
createData(ACell o)
static Message
createGoodBye(SignedData<ACell> peerKey)
static Message
createResponse(SignedData<ACell> response)
getID()
Gets the message ID for correlation, assuming this message type supports IDs.<T extends ACell>
TgetType()
toString()
withConnection(Connection peerConnection)
-
Method Details
-
create
-
create
-
createData
-
createBelief
-
createChallenge
-
createResponse
-
createGoodBye
-
getConnection
-
withConnection
-
getPayload
-
getType
-
getErrorCode
-
toString
-
getID
Gets the message ID for correlation, assuming this message type supports IDs.- Returns:
- Message ID, or null if the message type does not use message IDs
-