Package org.drasyl.event
Class PeerDirectEvent
- java.lang.Object
-
- org.drasyl.event.PeerDirectEvent
-
public class PeerDirectEvent extends Object
This event signals that the node has established a direct connection to a peer. This means that messages do not have to be relayed through a super peer.This is an immutable object.
- See Also:
PeerRelayEvent
,NodeOnlineEvent
,NodeOfflineEvent
-
-
Constructor Summary
Constructors Constructor Description PeerDirectEvent(Peer peer)
Deprecated, for removal: This API element is subject to removal in a future version.Useof(Peer)
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Peer
getPeer()
Returns the peer to which this event refers.int
hashCode()
static PeerDirectEvent
of(Peer peer)
String
toString()
-
-
-
Field Detail
-
peer
protected final Peer peer
-
-
Constructor Detail
-
PeerDirectEvent
@Deprecated(since="0.4.0", forRemoval=true) public PeerDirectEvent(Peer peer)
Deprecated, for removal: This API element is subject to removal in a future version.Useof(Peer)
instead.- Throws:
NullPointerException
- ifpeer
isnull
-
-
Method Detail
-
of
public static PeerDirectEvent of(Peer peer)
- Throws:
NullPointerException
- ifpeer
isnull
-
-