Package org.drasyl.event
Class NodeOnlineEvent
- java.lang.Object
-
- org.drasyl.event.NodeOnlineEvent
-
public class NodeOnlineEvent extends Object
This event signals that the node is currently connected to a super peer. This means that it can be contacted by other peers connected to the same super peer. In addition, the super peer can assist in establishing direct connections to other peers.If the node has been configured with no super peer, this event will be never emitted.
This is an immutable object.
- See Also:
NodeOfflineEvent
,PeerDirectEvent
,PeerRelayEvent
-
-
Constructor Summary
Constructors Constructor Description NodeOnlineEvent(Node node)
Deprecated, for removal: This API element is subject to removal in a future version.Useof(Node)
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Node
getNode()
Returns the node to which this event refers.int
hashCode()
static NodeOnlineEvent
of(Node node)
String
toString()
-
-
-
Field Detail
-
node
protected final Node node
-
-
Constructor Detail
-
NodeOnlineEvent
@Deprecated(since="0.4.0", forRemoval=true) public NodeOnlineEvent(Node node)
Deprecated, for removal: This API element is subject to removal in a future version.Useof(Node)
instead.- Throws:
NullPointerException
- ifnode
isnull
-
-
Method Detail
-
of
public static NodeOnlineEvent of(Node node)
- Throws:
NullPointerException
- ifnode
isnull
-
getNode
@NonNull public Node getNode()
Description copied from interface:NodeEvent
Returns the node to which this event refers.
-
-