public class SegmentedDatagramPacket extends DatagramPacket
Constructor and Description |
---|
SegmentedDatagramPacket(ByteBuf data,
int segmentSize,
InetSocketAddress recipient)
Create a new instance.
|
SegmentedDatagramPacket(ByteBuf data,
int segmentSize,
InetSocketAddress recipient,
InetSocketAddress sender)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
SegmentedDatagramPacket |
copy()
Creates a deep copy of this
ByteBufHolder . |
SegmentedDatagramPacket |
duplicate()
Duplicates this
ByteBufHolder . |
SegmentedDatagramPacket |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
SegmentedDatagramPacket |
retain()
Increases the reference count by
1 . |
SegmentedDatagramPacket |
retain(int increment)
Increases the reference count by the specified
increment . |
SegmentedDatagramPacket |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
int |
segmentSize()
Return the size of each segment (the last segment can be smaller).
|
SegmentedDatagramPacket |
touch()
Records the current access location of this object for debugging purposes.
|
SegmentedDatagramPacket |
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 SegmentedDatagramPacket(ByteBuf data, int segmentSize, InetSocketAddress recipient)
data
- the ByteBuf
which must be continguous.segmentSize
- the segment size.recipient
- the recipient.public SegmentedDatagramPacket(ByteBuf data, int segmentSize, InetSocketAddress recipient, InetSocketAddress sender)
data
- the ByteBuf
which must be continguous.segmentSize
- the segment size.recipient
- the recipient.public int segmentSize()
public SegmentedDatagramPacket copy()
ByteBufHolder
ByteBufHolder
.copy
in interface ByteBufHolder
copy
in class DatagramPacket
public SegmentedDatagramPacket duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
in interface ByteBufHolder
duplicate
in class DatagramPacket
public SegmentedDatagramPacket retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
in interface ByteBufHolder
retainedDuplicate
in class DatagramPacket
ByteBuf.retainedDuplicate()
public SegmentedDatagramPacket replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.replace
in interface ByteBufHolder
replace
in class DatagramPacket
public SegmentedDatagramPacket retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface AddressedEnvelope<ByteBuf,InetSocketAddress>
retain
in interface ReferenceCounted
retain
in class DatagramPacket
public SegmentedDatagramPacket retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface AddressedEnvelope<ByteBuf,InetSocketAddress>
retain
in interface ReferenceCounted
retain
in class DatagramPacket
public SegmentedDatagramPacket touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface AddressedEnvelope<ByteBuf,InetSocketAddress>
touch
in interface ReferenceCounted
touch
in class DatagramPacket
public SegmentedDatagramPacket touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface AddressedEnvelope<ByteBuf,InetSocketAddress>
touch
in interface ReferenceCounted
touch
in class DatagramPacket
Copyright © 2008–2024 The Netty Project. All rights reserved.