Package org.stellar.sdk.xdr
Class Hello
java.lang.Object
org.stellar.sdk.xdr.Hello
- All Implemented Interfaces:
XdrElement
Hello's original definition in the XDR file is:
struct Hello
{
uint32 ledgerVersion;
uint32 overlayVersion;
uint32 overlayMinVersion;
Hash networkID;
string versionStr<100>;
int listeningPort;
NodeID peerID;
AuthCert cert;
uint256 nonce;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Hello.HelloBuilderbuilder()static Hellodecode(XdrDataInputStream stream) static Hellodecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic Hellostatic HellofromXdrBase64(String xdr) static HellofromXdrByteArray(byte[] xdr) getCert()Value of thecertfield.Value of theledgerVersionfield.Value of thelisteningPortfield.Value of thenetworkIDfield.getNonce()Value of thenoncefield.Value of theoverlayMinVersionfield.Value of theoverlayVersionfield.Value of thepeerIDfield.Value of theversionStrfield.inthashCode()voidValue of thecertfield.voidsetLedgerVersion(Uint32 ledgerVersion) Value of theledgerVersionfield.voidsetListeningPort(Integer listeningPort) Value of thelisteningPortfield.voidsetNetworkID(Hash networkID) Value of thenetworkIDfield.voidValue of thenoncefield.voidsetOverlayMinVersion(Uint32 overlayMinVersion) Value of theoverlayMinVersionfield.voidsetOverlayVersion(Uint32 overlayVersion) Value of theoverlayVersionfield.voidValue of thepeerIDfield.voidsetVersionStr(XdrString versionStr) Value of theversionStrfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
Hello
public Hello() -
Hello
public Hello(Uint32 ledgerVersion, Uint32 overlayVersion, Uint32 overlayMinVersion, Hash networkID, XdrString versionStr, Integer listeningPort, NodeID peerID, AuthCert cert, Uint256 nonce) Creates a newHelloinstance.- Parameters:
ledgerVersion- theledgerVersionfield valueoverlayVersion- theoverlayVersionfield valueoverlayMinVersion- theoverlayMinVersionfield valuenetworkID- thenetworkIDfield valueversionStr- theversionStrfield valuelisteningPort- thelisteningPortfield valuepeerID- thepeerIDfield valuecert- thecertfield valuenonce- thenoncefield 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
- 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
-
getLedgerVersion
Value of theledgerVersionfield.- Returns:
- the
ledgerVersionfield value
-
getOverlayVersion
Value of theoverlayVersionfield.- Returns:
- the
overlayVersionfield value
-
getOverlayMinVersion
Value of theoverlayMinVersionfield.- Returns:
- the
overlayMinVersionfield value
-
getNetworkID
Value of thenetworkIDfield.- Returns:
- the
networkIDfield value
-
getVersionStr
Value of theversionStrfield.- Returns:
- the
versionStrfield value
-
getListeningPort
Value of thelisteningPortfield.- Returns:
- the
listeningPortfield value
-
getPeerID
Value of thepeerIDfield.- Returns:
- the
peerIDfield value
-
getCert
Value of thecertfield.- Returns:
- the
certfield value
-
getNonce
Value of thenoncefield.- Returns:
- the
noncefield value
-
setLedgerVersion
Value of theledgerVersionfield.- Parameters:
ledgerVersion- theledgerVersionfield value
-
setOverlayVersion
Value of theoverlayVersionfield.- Parameters:
overlayVersion- theoverlayVersionfield value
-
setOverlayMinVersion
Value of theoverlayMinVersionfield.- Parameters:
overlayMinVersion- theoverlayMinVersionfield value
-
setNetworkID
Value of thenetworkIDfield.- Parameters:
networkID- thenetworkIDfield value
-
setVersionStr
Value of theversionStrfield.- Parameters:
versionStr- theversionStrfield value
-
setListeningPort
Value of thelisteningPortfield.- Parameters:
listeningPort- thelisteningPortfield value
-
setPeerID
Value of thepeerIDfield.- Parameters:
peerID- thepeerIDfield value
-
setCert
Value of thecertfield.- Parameters:
cert- thecertfield value
-
setNonce
Value of thenoncefield.- Parameters:
nonce- thenoncefield value
-
equals
-
hashCode
public int hashCode() -
toString
-