public static class NetworkMessage.GetInfoMessage extends NetworkMessage
NetworkMessage.AddPeersMessage, NetworkMessage.BlockchainStateMessage, NetworkMessage.BlockIdsMessage, NetworkMessage.BlockInventoryMessage, NetworkMessage.BlocksMessage, NetworkMessage.BundlerRateMessage, NetworkMessage.CumulativeDifficultyMessage, NetworkMessage.ErrorMessage, NetworkMessage.GetBlockMessage, NetworkMessage.GetCumulativeDifficultyMessage, NetworkMessage.GetInfoMessage, NetworkMessage.GetMilestoneBlockIdsMessage, NetworkMessage.GetNextBlockIdsMessage, NetworkMessage.GetNextBlocksMessage, NetworkMessage.GetPeersMessage, NetworkMessage.GetTransactionsMessage, NetworkMessage.GetUnconfirmedTransactionsMessage, NetworkMessage.MilestoneBlockIdsMessage, NetworkMessage.TransactionsInventoryMessage, NetworkMessage.TransactionsMessage
MAX_ARRAY_LENGTH, MAX_LIST_SIZE, MAX_LIST_SIZE_PRE_2_3_3, messageId
Constructor and Description |
---|
GetInfoMessage(java.lang.String appName,
java.lang.String appVersion,
java.lang.String appPlatform,
boolean shareAddress,
java.lang.String announcedAddress,
int apiPort,
int sslPort,
long services,
java.lang.String disabledAPIs,
int apiServerIdleTimeout,
byte[] peerPublicKey)
Construct a GetInfo message
|
Modifier and Type | Method and Description |
---|---|
protected NetworkMessage |
constructMessage(java.nio.ByteBuffer bytes)
Construct the message from the message bytes
|
java.lang.String |
getAnnouncedAddress()
Get the announced address
|
int |
getApiPort()
Get the API port
|
int |
getApiServerIdleTimeout()
Get the API server idle timeout
|
java.lang.String |
getApplicationName()
Get the application name
|
java.lang.String |
getApplicationPlatform()
Get the application platform
|
java.lang.String |
getApplicationVersion()
Get the application version
|
Peer.BlockchainState |
getBlockchainState()
Get the blockchain state
|
java.lang.String |
getDisabledAPIs()
Get the disabledAPIs
|
SecurityToken |
getSecurityToken()
Get the authentication security token
|
long |
getServices()
Get the available services
|
boolean |
getShareAddress()
Check if the network address should be shared
|
int |
getSslPort()
Get the SSL port
|
void |
setBlockchainState(Peer.BlockchainState blockchainState)
Set the blockchain state
|
public GetInfoMessage(java.lang.String appName, java.lang.String appVersion, java.lang.String appPlatform, boolean shareAddress, java.lang.String announcedAddress, int apiPort, int sslPort, long services, java.lang.String disabledAPIs, int apiServerIdleTimeout, byte[] peerPublicKey)
appName
- Application nameappVersion
- Application versionappPlatform
- Application platformshareAddress
- TRUE to share the network address with peersannouncedAddress
- Announced address or nullapiPort
- API portsslPort
- API SSL portservices
- Available application servicesdisabledAPIs
- Disabled API namesapiServerIdleTimeout
- API server idle timeoutpeerPublicKey
- Peer public key or nullprotected NetworkMessage constructMessage(java.nio.ByteBuffer bytes) throws java.nio.BufferOverflowException, java.nio.BufferUnderflowException, nxt.peer.NetworkException
constructMessage
in class NetworkMessage
bytes
- Message bytes following the message namejava.nio.BufferOverflowException
- Message buffer is too smalljava.nio.BufferUnderflowException
- Message is too shortNetworkException
- Message is not validpublic java.lang.String getApplicationName()
public java.lang.String getApplicationVersion()
public java.lang.String getApplicationPlatform()
public boolean getShareAddress()
public java.lang.String getAnnouncedAddress()
public int getApiPort()
public int getSslPort()
public long getServices()
public java.lang.String getDisabledAPIs()
public int getApiServerIdleTimeout()
public Peer.BlockchainState getBlockchainState()
public void setBlockchainState(Peer.BlockchainState blockchainState)
blockchainState
- Blockchain statepublic SecurityToken getSecurityToken()