Package io.netty.channel
Class DefaultAddressedEnvelope<M,A extends SocketAddress>
- java.lang.Object
-
- io.netty.channel.DefaultAddressedEnvelope<M,A>
-
- Type Parameters:
M- the type of the wrapped messageA- the type of the recipient address
- All Implemented Interfaces:
AddressedEnvelope<M,A>,io.netty.util.ReferenceCounted
- Direct Known Subclasses:
DatagramPacket
public class DefaultAddressedEnvelope<M,A extends SocketAddress> extends Object implements AddressedEnvelope<M,A>
The defaultAddressedEnvelopeimplementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultAddressedEnvelope(M message, A recipient)Creates a new instance with the specifiedmessageandrecipientaddress.DefaultAddressedEnvelope(M message, A recipient, A sender)Creates a new instance with the specifiedmessage,recipientaddress, andsenderaddress.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Mcontent()Returns the message wrapped by this envelope message.Arecipient()Returns the address of the recipient of this message.intrefCnt()booleanrelease()booleanrelease(int decrement)AddressedEnvelope<M,A>retain()AddressedEnvelope<M,A>retain(int increment)Asender()Returns the address of the sender of this message.StringtoString()AddressedEnvelope<M,A>touch()AddressedEnvelope<M,A>touch(Object hint)
-
-
-
Method Detail
-
content
public M content()
Description copied from interface:AddressedEnvelopeReturns the message wrapped by this envelope message.- Specified by:
contentin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
sender
public A sender()
Description copied from interface:AddressedEnvelopeReturns the address of the sender of this message.- Specified by:
senderin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
recipient
public A recipient()
Description copied from interface:AddressedEnvelopeReturns the address of the recipient of this message.- Specified by:
recipientin interfaceAddressedEnvelope<M,A extends SocketAddress>
-
refCnt
public int refCnt()
- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
retain
public AddressedEnvelope<M,A> retain()
- Specified by:
retainin interfaceAddressedEnvelope<M,A extends SocketAddress>- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
retain
public AddressedEnvelope<M,A> retain(int increment)
- Specified by:
retainin interfaceAddressedEnvelope<M,A extends SocketAddress>- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int decrement)
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
touch
public AddressedEnvelope<M,A> touch()
- Specified by:
touchin interfaceAddressedEnvelope<M,A extends SocketAddress>- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
touch
public AddressedEnvelope<M,A> touch(Object hint)
- Specified by:
touchin interfaceAddressedEnvelope<M,A extends SocketAddress>- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
-