Package org.stellar.sdk.xdr
Class SurveyRequestMessage
java.lang.Object
org.stellar.sdk.xdr.SurveyRequestMessage
- All Implemented Interfaces:
XdrElement
SurveyRequestMessage's original definition in the XDR file is:
struct SurveyRequestMessage
{
NodeID surveyorPeerID;
NodeID surveyedPeerID;
uint32 ledgerNum;
Curve25519Public encryptionKey;
SurveyMessageCommandType commandType;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSurveyRequestMessage(NodeID surveyorPeerID, NodeID surveyedPeerID, Uint32 ledgerNum, Curve25519Public encryptionKey, SurveyMessageCommandType commandType) Creates a newSurveyRequestMessageinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SurveyRequestMessagedecode(XdrDataInputStream stream) static SurveyRequestMessagedecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SurveyRequestMessagestatic SurveyRequestMessagefromXdrBase64(String xdr) static SurveyRequestMessagefromXdrByteArray(byte[] xdr) Value of thecommandTypefield.Value of theencryptionKeyfield.Value of theledgerNumfield.Value of thesurveyedPeerIDfield.Value of thesurveyorPeerIDfield.inthashCode()voidsetCommandType(SurveyMessageCommandType commandType) Value of thecommandTypefield.voidsetEncryptionKey(Curve25519Public encryptionKey) Value of theencryptionKeyfield.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
-
SurveyRequestMessage
public SurveyRequestMessage() -
SurveyRequestMessage
public SurveyRequestMessage(NodeID surveyorPeerID, NodeID surveyedPeerID, Uint32 ledgerNum, Curve25519Public encryptionKey, SurveyMessageCommandType commandType) Creates a newSurveyRequestMessageinstance.- Parameters:
surveyorPeerID- thesurveyorPeerIDfield valuesurveyedPeerID- thesurveyedPeerIDfield valueledgerNum- theledgerNumfield valueencryptionKey- theencryptionKeyfield valuecommandType- thecommandTypefield 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 SurveyRequestMessage 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
-
getEncryptionKey
Value of theencryptionKeyfield.- Returns:
- the
encryptionKeyfield value
-
getCommandType
Value of thecommandTypefield.- Returns:
- the
commandTypefield 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
-
setEncryptionKey
Value of theencryptionKeyfield.- Parameters:
encryptionKey- theencryptionKeyfield value
-
setCommandType
Value of thecommandTypefield.- Parameters:
commandType- thecommandTypefield value
-
equals
-
hashCode
public int hashCode() -
toString
-