Package org.stellar.sdk.xdr
Class StellarMessage
java.lang.Object
org.stellar.sdk.xdr.StellarMessage
StellarMessage's original definition in the XDR file is:
union StellarMessage switch (MessageType type) { case ERROR_MSG: Error error; case HELLO: Hello hello; case AUTH: Auth auth; case DONT_HAVE: DontHave dontHave; case GET_PEERS: void; case PEERS: PeerAddress peers<100>; case GET_TX_SET: uint256 txSetHash; case TX_SET: TransactionSet txSet; case GENERALIZED_TX_SET: GeneralizedTransactionSet generalizedTxSet; case TRANSACTION: TransactionEnvelope transaction; case SURVEY_REQUEST: SignedSurveyRequestMessage signedSurveyRequestMessage; case SURVEY_RESPONSE: SignedSurveyResponseMessage signedSurveyResponseMessage; case TIME_SLICED_SURVEY_REQUEST: SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage; case TIME_SLICED_SURVEY_RESPONSE: SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage; case TIME_SLICED_SURVEY_START_COLLECTING: SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage; case TIME_SLICED_SURVEY_STOP_COLLECTING: SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage; // SCP case GET_SCP_QUORUMSET: uint256 qSetHash; case SCP_QUORUMSET: SCPQuorumSet qSet; case SCP_MESSAGE: SCPEnvelope envelope; case GET_SCP_STATE: uint32 getSCPLedgerSeq; // ledger seq requested ; if 0, requests the latest case SEND_MORE: SendMore sendMoreMessage; case SEND_MORE_EXTENDED: SendMoreExtended sendMoreExtendedMessage; // Pull mode case FLOOD_ADVERT: FloodAdvert floodAdvert; case FLOOD_DEMAND: FloodDemand floodDemand; };
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionStellarMessage
(MessageType discriminant, Error error, Hello hello, Auth auth, DontHave dontHave, PeerAddress[] peers, Uint256 txSetHash, TransactionSet txSet, GeneralizedTransactionSet generalizedTxSet, TransactionEnvelope transaction, SignedSurveyRequestMessage signedSurveyRequestMessage, SignedSurveyResponseMessage signedSurveyResponseMessage, SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage, SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage, SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage, SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage, Uint256 qSetHash, SCPQuorumSet qSet, SCPEnvelope envelope, Uint32 getSCPLedgerSeq, SendMore sendMoreMessage, SendMoreExtended sendMoreExtendedMessage, FloodAdvert floodAdvert, FloodDemand floodDemand) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
static StellarMessage
decode
(XdrDataInputStream stream) void
encode
(XdrDataOutputStream stream) boolean
static StellarMessage
fromXdrBase64
(String xdr) static StellarMessage
fromXdrByteArray
(byte[] xdr) getAuth()
getError()
getHello()
getPeers()
getQSet()
getTxSet()
int
hashCode()
void
void
setDiscriminant
(MessageType discriminant) void
setDontHave
(DontHave dontHave) void
setEnvelope
(SCPEnvelope envelope) void
void
setFloodAdvert
(FloodAdvert floodAdvert) void
setFloodDemand
(FloodDemand floodDemand) void
setGeneralizedTxSet
(GeneralizedTransactionSet generalizedTxSet) void
setGetSCPLedgerSeq
(Uint32 getSCPLedgerSeq) void
void
setPeers
(PeerAddress[] peers) void
setQSet
(SCPQuorumSet qSet) void
setQSetHash
(Uint256 qSetHash) void
setSendMoreExtendedMessage
(SendMoreExtended sendMoreExtendedMessage) void
setSendMoreMessage
(SendMore sendMoreMessage) void
setSignedSurveyRequestMessage
(SignedSurveyRequestMessage signedSurveyRequestMessage) void
setSignedSurveyResponseMessage
(SignedSurveyResponseMessage signedSurveyResponseMessage) void
setSignedTimeSlicedSurveyRequestMessage
(SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage) void
setSignedTimeSlicedSurveyResponseMessage
(SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage) void
setSignedTimeSlicedSurveyStartCollectingMessage
(SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage) void
setSignedTimeSlicedSurveyStopCollectingMessage
(SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage) void
setTransaction
(TransactionEnvelope transaction) void
setTxSet
(TransactionSet txSet) void
setTxSetHash
(Uint256 txSetHash) toString()
default String
default byte[]
-
Constructor Details
-
StellarMessage
public StellarMessage() -
StellarMessage
public StellarMessage(MessageType discriminant, Error error, Hello hello, Auth auth, DontHave dontHave, PeerAddress[] peers, Uint256 txSetHash, TransactionSet txSet, GeneralizedTransactionSet generalizedTxSet, TransactionEnvelope transaction, SignedSurveyRequestMessage signedSurveyRequestMessage, SignedSurveyResponseMessage signedSurveyResponseMessage, SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage, SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage, SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage, SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage, Uint256 qSetHash, SCPQuorumSet qSet, SCPEnvelope envelope, Uint32 getSCPLedgerSeq, SendMore sendMoreMessage, SendMoreExtended sendMoreExtendedMessage, FloodAdvert floodAdvert, FloodDemand floodDemand)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getError
-
getHello
-
getAuth
-
getDontHave
-
getPeers
-
getTxSetHash
-
getTxSet
-
getGeneralizedTxSet
-
getTransaction
-
getSignedSurveyRequestMessage
-
getSignedSurveyResponseMessage
-
getSignedTimeSlicedSurveyRequestMessage
-
getSignedTimeSlicedSurveyResponseMessage
-
getSignedTimeSlicedSurveyStartCollectingMessage
public SignedTimeSlicedSurveyStartCollectingMessage getSignedTimeSlicedSurveyStartCollectingMessage() -
getSignedTimeSlicedSurveyStopCollectingMessage
-
getQSetHash
-
getQSet
-
getEnvelope
-
getGetSCPLedgerSeq
-
getSendMoreMessage
-
getSendMoreExtendedMessage
-
getFloodAdvert
-
getFloodDemand
-
setDiscriminant
-
setError
-
setHello
-
setAuth
-
setDontHave
-
setPeers
-
setTxSetHash
-
setTxSet
-
setGeneralizedTxSet
-
setTransaction
-
setSignedSurveyRequestMessage
-
setSignedSurveyResponseMessage
-
setSignedTimeSlicedSurveyRequestMessage
public void setSignedTimeSlicedSurveyRequestMessage(SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage) -
setSignedTimeSlicedSurveyResponseMessage
public void setSignedTimeSlicedSurveyResponseMessage(SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage) -
setSignedTimeSlicedSurveyStartCollectingMessage
public void setSignedTimeSlicedSurveyStartCollectingMessage(SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage) -
setSignedTimeSlicedSurveyStopCollectingMessage
public void setSignedTimeSlicedSurveyStopCollectingMessage(SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage) -
setQSetHash
-
setQSet
-
setEnvelope
-
setGetSCPLedgerSeq
-
setSendMoreMessage
-
setSendMoreExtendedMessage
-
setFloodAdvert
-
setFloodDemand
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-