Package org.drasyl.node.event
Class Node
java.lang.Object
org.drasyl.node.event.Node
Used by
Event
to describe an event related to the local Node (e.g. NodeUpEvent
,
NodeOnlineEvent
).
This is an immutable object.
-
Constructor Details
-
Node
public Node()
-
-
Method Details
-
getIdentity
Returns the node's identity.- Returns:
- the node's identity
-
getPort
public abstract int getPort()Returns the node's server port.- Returns:
- the node's server port
-
getTcpFallbackPort
public abstract int getTcpFallbackPort()Returns the node's tcp fallback server port.- Returns:
- the node's tcp fallback server port
-
of
- Throws:
NullPointerException
- ifidentity
isnull
-
of
- Throws:
NullPointerException
- ifidentity
isnull
IllegalArgumentException
- ifport
is negative
-
of
- Throws:
NullPointerException
- ifidentity
isnull
IllegalArgumentException
- ifport
ortcpFallbackPort
is negative
-