public class StellarMessage extends java.lang.Object implements XdrElement
union StellarMessage switch (MessageType type) { case ERROR_MSG: Error error; case HELLO: Hello hello; case AUTH: Auth auth; case DONT_HAVE: DontHave dontHave; 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 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; };
Modifier and Type | Class and Description |
---|---|
static class |
StellarMessage.StellarMessageBuilder |
Constructor and Description |
---|
StellarMessage() |
StellarMessage(MessageType discriminant,
Error error,
Hello hello,
Auth auth,
DontHave dontHave,
PeerAddress[] peers,
Uint256 txSetHash,
TransactionSet txSet,
GeneralizedTransactionSet generalizedTxSet,
TransactionEnvelope transaction,
SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage,
SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage,
SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage,
SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage,
Uint256 qSetHash,
SCPQuorumSet qSet,
SCPEnvelope envelope,
Uint32 getSCPLedgerSeq,
SendMore sendMoreMessage,
SendMoreExtended sendMoreExtendedMessage,
FloodAdvert floodAdvert,
FloodDemand floodDemand) |
toXdrBase64, toXdrByteArray
public StellarMessage()
public StellarMessage(MessageType discriminant, Error error, Hello hello, Auth auth, DontHave dontHave, PeerAddress[] peers, Uint256 txSetHash, TransactionSet txSet, GeneralizedTransactionSet generalizedTxSet, TransactionEnvelope transaction, SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage, SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage, SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage, SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage, Uint256 qSetHash, SCPQuorumSet qSet, SCPEnvelope envelope, Uint32 getSCPLedgerSeq, SendMore sendMoreMessage, SendMoreExtended sendMoreExtendedMessage, FloodAdvert floodAdvert, FloodDemand floodDemand)
public void encode(XdrDataOutputStream stream) throws java.io.IOException
encode
in interface XdrElement
java.io.IOException
public static StellarMessage decode(XdrDataInputStream stream) throws java.io.IOException
java.io.IOException
public static StellarMessage fromXdrBase64(java.lang.String xdr) throws java.io.IOException
java.io.IOException
public static StellarMessage fromXdrByteArray(byte[] xdr) throws java.io.IOException
java.io.IOException
public static StellarMessage.StellarMessageBuilder builder()
public StellarMessage.StellarMessageBuilder toBuilder()
public MessageType getDiscriminant()
public Error getError()
public Hello getHello()
public Auth getAuth()
public DontHave getDontHave()
public PeerAddress[] getPeers()
public Uint256 getTxSetHash()
public TransactionSet getTxSet()
public GeneralizedTransactionSet getGeneralizedTxSet()
public TransactionEnvelope getTransaction()
public SignedTimeSlicedSurveyRequestMessage getSignedTimeSlicedSurveyRequestMessage()
public SignedTimeSlicedSurveyResponseMessage getSignedTimeSlicedSurveyResponseMessage()
public SignedTimeSlicedSurveyStartCollectingMessage getSignedTimeSlicedSurveyStartCollectingMessage()
public SignedTimeSlicedSurveyStopCollectingMessage getSignedTimeSlicedSurveyStopCollectingMessage()
public Uint256 getQSetHash()
public SCPQuorumSet getQSet()
public SCPEnvelope getEnvelope()
public Uint32 getGetSCPLedgerSeq()
public SendMore getSendMoreMessage()
public SendMoreExtended getSendMoreExtendedMessage()
public FloodAdvert getFloodAdvert()
public FloodDemand getFloodDemand()
public void setDiscriminant(MessageType discriminant)
public void setError(Error error)
public void setHello(Hello hello)
public void setAuth(Auth auth)
public void setDontHave(DontHave dontHave)
public void setPeers(PeerAddress[] peers)
public void setTxSetHash(Uint256 txSetHash)
public void setTxSet(TransactionSet txSet)
public void setGeneralizedTxSet(GeneralizedTransactionSet generalizedTxSet)
public void setTransaction(TransactionEnvelope transaction)
public void setSignedTimeSlicedSurveyRequestMessage(SignedTimeSlicedSurveyRequestMessage signedTimeSlicedSurveyRequestMessage)
public void setSignedTimeSlicedSurveyResponseMessage(SignedTimeSlicedSurveyResponseMessage signedTimeSlicedSurveyResponseMessage)
public void setSignedTimeSlicedSurveyStartCollectingMessage(SignedTimeSlicedSurveyStartCollectingMessage signedTimeSlicedSurveyStartCollectingMessage)
public void setSignedTimeSlicedSurveyStopCollectingMessage(SignedTimeSlicedSurveyStopCollectingMessage signedTimeSlicedSurveyStopCollectingMessage)
public void setQSetHash(Uint256 qSetHash)
public void setQSet(SCPQuorumSet qSet)
public void setEnvelope(SCPEnvelope envelope)
public void setGetSCPLedgerSeq(Uint32 getSCPLedgerSeq)
public void setSendMoreMessage(SendMore sendMoreMessage)
public void setSendMoreExtendedMessage(SendMoreExtended sendMoreExtendedMessage)
public void setFloodAdvert(FloodAdvert floodAdvert)
public void setFloodDemand(FloodDemand floodDemand)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object