Package org.drasyl.channel
Class OverlayAddressedMessage<M>
java.lang.Object
io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
org.drasyl.channel.OverlayAddressedMessage<M>
- Type Parameters:
M
- the type of the wrapped message
- All Implemented Interfaces:
io.netty.channel.AddressedEnvelope<M,
,DrasylAddress> io.netty.util.ReferenceCounted
public class OverlayAddressedMessage<M>
extends io.netty.channel.DefaultAddressedEnvelope<M,DrasylAddress>
A message that wraps another message with a
DrasylAddress
.-
Constructor Summary
ConstructorDescriptionOverlayAddressedMessage
(M message, DrasylAddress recipient) OverlayAddressedMessage
(M message, DrasylAddress recipient, DrasylAddress sender) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
<N> OverlayAddressedMessage<N>
replace
(N newContent) Returns a copy of this message withnewContent
as the newDefaultAddressedEnvelope.content()
.resolve
(InetSocketAddress address) Returns a copy of this message withnewRecipient
as the newDefaultAddressedEnvelope.recipient()
.retain()
retain
(int increment) touch()
Methods inherited from class io.netty.channel.DefaultAddressedEnvelope
content, recipient, refCnt, release, release, sender, toString
-
Constructor Details
-
OverlayAddressedMessage
- Throws:
NullPointerException
- ifmessage
orrecipient
isnull
-
OverlayAddressedMessage
- Throws:
NullPointerException
- ifmessage
orrecipient
andsender
arenull
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
retain
- Specified by:
retain
in interfaceio.netty.channel.AddressedEnvelope<M,
DrasylAddress> - Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Overrides:
retain
in classio.netty.channel.DefaultAddressedEnvelope<M,
DrasylAddress>
-
retain
- Specified by:
retain
in interfaceio.netty.channel.AddressedEnvelope<M,
DrasylAddress> - Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Overrides:
retain
in classio.netty.channel.DefaultAddressedEnvelope<M,
DrasylAddress>
-
touch
- Specified by:
touch
in interfaceio.netty.channel.AddressedEnvelope<M,
DrasylAddress> - Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Overrides:
touch
in classio.netty.channel.DefaultAddressedEnvelope<M,
DrasylAddress>
-
touch
- Specified by:
touch
in interfaceio.netty.channel.AddressedEnvelope<M,
DrasylAddress> - Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Overrides:
touch
in classio.netty.channel.DefaultAddressedEnvelope<M,
DrasylAddress>
-
resolve
Returns a copy of this message withnewRecipient
as the newDefaultAddressedEnvelope.recipient()
. -
replace
Returns a copy of this message withnewContent
as the newDefaultAddressedEnvelope.content()
.
-