public final class DomainDatagramPacket extends DefaultAddressedEnvelope<ByteBuf,DomainSocketAddress> implements ByteBufHolder
DomainDatagramChannel
to communicate with the remote peer.Constructor and Description |
---|
DomainDatagramPacket(ByteBuf data,
DomainSocketAddress recipient)
Create a new instance with the specified packet
data and recipient address. |
DomainDatagramPacket(ByteBuf data,
DomainSocketAddress recipient,
DomainSocketAddress sender)
Create a new instance with the specified packet
data , recipient address, and sender
address. |
Modifier and Type | Method and Description |
---|---|
DomainDatagramPacket |
copy()
Creates a deep copy of this
ByteBufHolder . |
DomainDatagramPacket |
duplicate()
Duplicates this
ByteBufHolder . |
DomainDatagramPacket |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
DomainDatagramPacket |
retain()
Increases the reference count by
1 . |
DomainDatagramPacket |
retain(int increment)
Increases the reference count by the specified
increment . |
DomainDatagramPacket |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
DomainDatagramPacket |
touch()
Records the current access location of this object for debugging purposes.
|
DomainDatagramPacket |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
content, recipient, refCnt, release, release, sender, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
content
refCnt, release, release
public DomainDatagramPacket(ByteBuf data, DomainSocketAddress recipient)
data
and recipient
address.public DomainDatagramPacket(ByteBuf data, DomainSocketAddress recipient, DomainSocketAddress sender)
data
, recipient
address, and sender
address.public DomainDatagramPacket copy()
ByteBufHolder
ByteBufHolder
.copy
in interface ByteBufHolder
public DomainDatagramPacket duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
in interface ByteBufHolder
public DomainDatagramPacket replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.replace
in interface ByteBufHolder
public DomainDatagramPacket retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface AddressedEnvelope<ByteBuf,DomainSocketAddress>
retain
in interface ReferenceCounted
retain
in class DefaultAddressedEnvelope<ByteBuf,DomainSocketAddress>
public DomainDatagramPacket retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface AddressedEnvelope<ByteBuf,DomainSocketAddress>
retain
in interface ReferenceCounted
retain
in class DefaultAddressedEnvelope<ByteBuf,DomainSocketAddress>
public DomainDatagramPacket retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
in interface ByteBufHolder
ByteBuf.retainedDuplicate()
public DomainDatagramPacket touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface AddressedEnvelope<ByteBuf,DomainSocketAddress>
touch
in interface ReferenceCounted
touch
in class DefaultAddressedEnvelope<ByteBuf,DomainSocketAddress>
public DomainDatagramPacket touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface AddressedEnvelope<ByteBuf,DomainSocketAddress>
touch
in interface ReferenceCounted
touch
in class DefaultAddressedEnvelope<ByteBuf,DomainSocketAddress>
Copyright © 2008–2024 The Netty Project. All rights reserved.