Package org.drasyl.node.event
Class Peer
java.lang.Object
org.drasyl.node.event.Peer
Used by
Event
to describe an event related to a Peer (e.g. PeerRelayEvent
, PeerDirectEvent
).
This is an immutable object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract DrasylAddress
Returns the peer's address.Deprecated, for removal: This API element is subject to removal in a future version.static Peer
of
(DrasylAddress address)
-
Constructor Details
-
Peer
public Peer()
-
-
Method Details
-
getAddress
Returns the peer's address.- Returns:
- the peer's address.
-
getIdentityPublicKey
Deprecated, for removal: This API element is subject to removal in a future version.UsegetAddress()
instead.Returns the peer's public key.- Returns:
- the peer's public key.
-
of
- Throws:
NullPointerException
- ifaddress
isnull
-
getAddress()
instead.