Package org.stellar.sdk.xdr
Class SurveyResponseMessage
java.lang.Object
org.stellar.sdk.xdr.SurveyResponseMessage
- All Implemented Interfaces:
XdrElement
SurveyResponseMessage's original definition in the XDR file is:
struct SurveyResponseMessage
{
NodeID surveyorPeerID;
NodeID surveyedPeerID;
uint32 ledgerNum;
SurveyMessageCommandType commandType;
EncryptedBody encryptedBody;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSurveyResponseMessage(NodeID surveyorPeerID, NodeID surveyedPeerID, Uint32 ledgerNum, SurveyMessageCommandType commandType, EncryptedBody encryptedBody) Creates a newSurveyResponseMessageinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SurveyResponseMessagedecode(XdrDataInputStream stream) static SurveyResponseMessagedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SurveyResponseMessagestatic SurveyResponseMessagefromXdrBase64(String xdr) static SurveyResponseMessagefromXdrByteArray(byte[] xdr) Value of thecommandTypefield.Value of theencryptedBodyfield.Value of theledgerNumfield.Value of thesurveyedPeerIDfield.Value of thesurveyorPeerIDfield.inthashCode()voidsetCommandType(SurveyMessageCommandType commandType) Value of thecommandTypefield.voidsetEncryptedBody(EncryptedBody encryptedBody) Value of theencryptedBodyfield.voidsetLedgerNum(Uint32 ledgerNum) Value of theledgerNumfield.voidsetSurveyedPeerID(NodeID surveyedPeerID) Value of thesurveyedPeerIDfield.voidsetSurveyorPeerID(NodeID surveyorPeerID) Value of thesurveyorPeerIDfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SurveyResponseMessage
public SurveyResponseMessage() -
SurveyResponseMessage
public SurveyResponseMessage(NodeID surveyorPeerID, NodeID surveyedPeerID, Uint32 ledgerNum, SurveyMessageCommandType commandType, EncryptedBody encryptedBody) Creates a newSurveyResponseMessageinstance.- Parameters:
surveyorPeerID- thesurveyorPeerIDfield valuesurveyedPeerID- thesurveyedPeerIDfield valueledgerNum- theledgerNumfield valuecommandType- thecommandTypefield valueencryptedBody- theencryptedBodyfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
public static SurveyResponseMessage decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getSurveyorPeerID
Value of thesurveyorPeerIDfield.- Returns:
- the
surveyorPeerIDfield value
-
getSurveyedPeerID
Value of thesurveyedPeerIDfield.- Returns:
- the
surveyedPeerIDfield value
-
getLedgerNum
Value of theledgerNumfield.- Returns:
- the
ledgerNumfield value
-
getCommandType
Value of thecommandTypefield.- Returns:
- the
commandTypefield value
-
getEncryptedBody
Value of theencryptedBodyfield.- Returns:
- the
encryptedBodyfield value
-
setSurveyorPeerID
Value of thesurveyorPeerIDfield.- Parameters:
surveyorPeerID- thesurveyorPeerIDfield value
-
setSurveyedPeerID
Value of thesurveyedPeerIDfield.- Parameters:
surveyedPeerID- thesurveyedPeerIDfield value
-
setLedgerNum
Value of theledgerNumfield.- Parameters:
ledgerNum- theledgerNumfield value
-
setCommandType
Value of thecommandTypefield.- Parameters:
commandType- thecommandTypefield value
-
setEncryptedBody
Value of theencryptedBodyfield.- Parameters:
encryptedBody- theencryptedBodyfield value
-
equals
-
hashCode
public int hashCode() -
toString
-