Package org.drasyl.event
Class PeerRelayEvent
- java.lang.Object
-
- org.drasyl.event.PeerRelayEvent
-
public class PeerRelayEvent extends Object
This event signals that communication with this peer is only possible by relaying messages via a super peer. If there is no connection to a super peer, no communication with this peer is possible.This is an immutable object.
- See Also:
PeerDirectEvent
,NodeOnlineEvent
,NodeOfflineEvent
-
-
Constructor Summary
Constructors Constructor Description PeerRelayEvent(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 PeerRelayEvent
of(Peer peer)
String
toString()
-
-
-
Field Detail
-
peer
protected final Peer peer
-
-
Constructor Detail
-
PeerRelayEvent
@Deprecated(since="0.4.0", forRemoval=true) public PeerRelayEvent(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 PeerRelayEvent of(Peer peer)
- Throws:
NullPointerException
- ifpeer
isnull
-
-