Internal utility class.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.BaseNode
BaseNode.MetadataInterceptor -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.BaseNode
address, badGrpcStatusCount, channel, currentBackoff, executor, maxBackoff, minBackoff, readmitTime -
Constructor Summary
ConstructorsConstructorDescriptionNode(AccountId accountId, BaseNodeAddress address, ExecutorService executor) Constructor.Node(AccountId accountId, String address, ExecutorService executor) Constructor.Node(Node node, BaseNodeAddress address) Constructor for a node that verifies certificates. -
Method Summary
Modifier and TypeMethodDescription(package private) AccountIdExtract the account id.(package private) @Nullable NodeAddressExtract the address book.(package private) io.grpc.ChannelCredentialsCreate TLS credentials when transport security is enabled(package private) AccountIdgetKey()Extract the key list(package private) booleanAre the certificates being verified?(package private) NodesetAddressBookEntry(@Nullable NodeAddress addressBookEntry) Assign the address book.(package private) NodesetVerifyCertificates(boolean verifyCertificates) Assign the certificate status.(package private) NodeCreate an insecure version of this node(package private) NodetoSecure()Create a secure version of this nodetoString()Methods inherited from class com.hedera.hashgraph.sdk.BaseNode
channelFailedToConnect, channelFailedToConnect, channelFailedToConnectAsync, close, decreaseBackoff, getAddress, getAuthority, getBadGrpcStatusCount, getChannel, getMaxBackoff, getMinBackoff, getRemainingTimeForBackoff, increaseBackoff, isHealthy, setMaxBackoff, setMinBackoff, unhealthyBackoffRemaining
-
Constructor Details
-
Node
Node(AccountId accountId, BaseNodeAddress address, ExecutorService executor) Constructor.- Parameters:
accountId- the account idaddress- the address as a managed node addressexecutor- the executor service
-
Node
Node(AccountId accountId, String address, ExecutorService executor) Constructor.- Parameters:
accountId- the account idaddress- the address as a stringexecutor- the executor service
-
Node
Node(Node node, BaseNodeAddress address) Constructor for a node that verifies certificates.- Parameters:
node- the nodeaddress- the address as a managed node address
-
-
Method Details
-
toInsecure
Node toInsecure()Create an insecure version of this node- Returns:
- the insecure version of the node
-
toSecure
Node toSecure()Create a secure version of this node- Returns:
- the secure version of the node
-
getKey
AccountId getKey()Description copied from class:BaseNodeExtract the key list -
getAccountId
AccountId getAccountId()Extract the account id.- Returns:
- the account id
-
getAddressBookEntry
@Nullable NodeAddress getAddressBookEntry()Extract the address book.- Returns:
- the address book
-
setAddressBookEntry
Assign the address book.- Parameters:
addressBookEntry- the address book- Returns:
this
-
isVerifyCertificates
boolean isVerifyCertificates()Are the certificates being verified?- Returns:
- are the certificates being verified
-
setVerifyCertificates
Assign the certificate status.- Parameters:
verifyCertificates- should certificates be verified- Returns:
this
-
getChannelCredentials
io.grpc.ChannelCredentials getChannelCredentials()Description copied from class:BaseNodeCreate TLS credentials when transport security is enabled- Overrides:
getChannelCredentialsin classBaseNode<Node,AccountId> - Returns:
- the channel credentials
-
toString
-