java.lang.Object
com.hedera.hashgraph.sdk.RegisteredNode
Class representing single registered node in the network state.
Each registered node in the network state SHALL represent a single
non-consensus node that is registered on the network.
Registered node identifiers SHALL only be unique within a single
realm and shard combination.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal KeyAn administrative key controlled by the node operator.final StringA short description of the node.final longA registered node identifier.final List<RegisteredServiceEndpoint> A list of service endpoints for client calls. -
Constructor Summary
ConstructorsConstructorDescriptionRegisteredNode(long registeredNodeId, Key adminKey, String description, List<RegisteredServiceEndpoint> serviceEndpoint) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic RegisteredNodefromBytes(byte[] bytes) Extract the registeredNode from a byte array.(package private) static RegisteredNodefromJson(com.google.gson.JsonObject json) Parses a single node entry from the Mirror Node 'registered_nodes' array.(package private) static RegisteredNodefromProtobuf(RegisteredNode registeredNode) Extract the registeredNode from the protobuf.byte[]toBytes()Create a byte array representation.(package private) RegisteredNodeBuild the protobuf.toString()
-
Field Details
-
registeredNodeId
@Nonnegative public final long registeredNodeIdA registered node identifier. -
adminKey
An administrative key controlled by the node operator. -
description
A short description of the node. -
serviceEndpoints
A list of service endpoints for client calls.
-
-
Constructor Details
-
RegisteredNode
RegisteredNode(long registeredNodeId, Key adminKey, String description, List<RegisteredServiceEndpoint> serviceEndpoint) Constructor.- Parameters:
registeredNodeId- the registered node identifier.adminKey- the admin key.description- the description of the node.serviceEndpoint- the list of service endpoints.
-
-
Method Details
-
fromProtobuf
Extract the registeredNode from the protobuf.- Parameters:
registeredNode- the protobuf- Returns:
thisthe contract object
-
fromJson
Parses a single node entry from the Mirror Node 'registered_nodes' array.- Parameters:
json- the json containing specific data for registered node- Returns:
this
-
fromBytes
public static RegisteredNode fromBytes(byte[] bytes) throws com.google.protobuf.InvalidProtocolBufferException Extract the registeredNode from a byte array.- Parameters:
bytes- the byte array- Returns:
RegisteredNodethe extracted registeredNode- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
toProtobuf
RegisteredNode toProtobuf()Build the protobuf.- Returns:
thisthe protobuf representation
-
toBytes
public byte[] toBytes()Create a byte array representation.- Returns:
byte[]the byte array representation
-
toString
-