public class DefaultSpdyDataFrame extends DefaultSpdyStreamFrame implements SpdyDataFrame
SpdyDataFrame
implementation.Constructor and Description |
---|
DefaultSpdyDataFrame(int streamId)
Creates a new instance.
|
DefaultSpdyDataFrame(int streamId,
ByteBuf data)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
ByteBuf |
content()
Returns the data payload of this frame.
|
SpdyDataFrame |
copy()
Creates a deep copy of this
ByteBufHolder . |
SpdyDataFrame |
duplicate()
Duplicates this
ByteBufHolder . |
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0 . |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0 . |
SpdyDataFrame |
replace(ByteBuf content)
Returns a new
ByteBufHolder which contains the specified content . |
SpdyDataFrame |
retain()
Increases the reference count by
1 . |
SpdyDataFrame |
retain(int increment)
Increases the reference count by the specified
increment . |
SpdyDataFrame |
retainedDuplicate()
Duplicates this
ByteBufHolder . |
SpdyDataFrame |
setLast(boolean last)
Sets if this frame is the last frame to be transmitted on the stream.
|
SpdyDataFrame |
setStreamId(int streamId)
Sets the Stream-ID of this frame.
|
String |
toString() |
SpdyDataFrame |
touch()
Records the current access location of this object for debugging purposes.
|
SpdyDataFrame |
touch(Object hint)
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
isLast, streamId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isLast, streamId
public DefaultSpdyDataFrame(int streamId)
streamId
- the Stream-ID of this framepublic DefaultSpdyDataFrame(int streamId, ByteBuf data)
streamId
- the Stream-ID of this framedata
- the payload of the frame. Can not exceed SpdyCodecUtil.SPDY_MAX_LENGTH
public SpdyDataFrame setStreamId(int streamId)
SpdyStreamFrame
setStreamId
in interface SpdyDataFrame
setStreamId
in interface SpdyStreamFrame
setStreamId
in class DefaultSpdyStreamFrame
public SpdyDataFrame setLast(boolean last)
SpdyStreamFrame
setLast
in interface SpdyDataFrame
setLast
in interface SpdyStreamFrame
setLast
in class DefaultSpdyStreamFrame
public ByteBuf content()
SpdyDataFrame
Unpooled.EMPTY_BUFFER
is returned.
The data payload cannot exceed 16777215 bytes.content
in interface ByteBufHolder
content
in interface SpdyDataFrame
public SpdyDataFrame copy()
ByteBufHolder
ByteBufHolder
.copy
in interface ByteBufHolder
copy
in interface SpdyDataFrame
public SpdyDataFrame duplicate()
ByteBufHolder
ByteBufHolder
. Be aware that this will not automatically call ByteBufHolder.retain()
.duplicate
in interface ByteBufHolder
duplicate
in interface SpdyDataFrame
public SpdyDataFrame retainedDuplicate()
ByteBufHolder
ByteBufHolder
. This method returns a retained duplicate unlike ByteBufHolder.duplicate()
.retainedDuplicate
in interface ByteBufHolder
retainedDuplicate
in interface SpdyDataFrame
ByteBuf.retainedDuplicate()
public SpdyDataFrame replace(ByteBuf content)
ByteBufHolder
ByteBufHolder
which contains the specified content
.replace
in interface ByteBufHolder
replace
in interface SpdyDataFrame
public int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.refCnt
in interface ReferenceCounted
public SpdyDataFrame retain()
ReferenceCounted
1
.retain
in interface ByteBufHolder
retain
in interface SpdyDataFrame
retain
in interface ReferenceCounted
public SpdyDataFrame retain(int increment)
ReferenceCounted
increment
.retain
in interface ByteBufHolder
retain
in interface SpdyDataFrame
retain
in interface ReferenceCounted
public SpdyDataFrame touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface ByteBufHolder
touch
in interface SpdyDataFrame
touch
in interface ReferenceCounted
public SpdyDataFrame touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface ByteBufHolder
touch
in interface SpdyDataFrame
touch
in interface ReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedCopyright © 2008–2017 The Netty Project. All rights reserved.