Package io.netty.handler.codec.spdy
Class DefaultSpdyDataFrame
- java.lang.Object
-
- io.netty.handler.codec.spdy.DefaultSpdyStreamFrame
-
- io.netty.handler.codec.spdy.DefaultSpdyDataFrame
-
- All Implemented Interfaces:
io.netty.buffer.ByteBufHolder
,SpdyDataFrame
,SpdyFrame
,SpdyStreamFrame
,io.netty.util.ReferenceCounted
public class DefaultSpdyDataFrame extends DefaultSpdyStreamFrame implements SpdyDataFrame
The defaultSpdyDataFrame
implementation.
-
-
Constructor Summary
Constructors Constructor Description DefaultSpdyDataFrame(int streamId)
Creates a new instance.DefaultSpdyDataFrame(int streamId, io.netty.buffer.ByteBuf data)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.buffer.ByteBuf
content()
Returns the data payload of this frame.SpdyDataFrame
copy()
SpdyDataFrame
duplicate()
int
refCnt()
boolean
release()
boolean
release(int decrement)
SpdyDataFrame
replace(io.netty.buffer.ByteBuf content)
SpdyDataFrame
retain()
SpdyDataFrame
retain(int increment)
SpdyDataFrame
retainedDuplicate()
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()
SpdyDataFrame
touch(Object hint)
-
Methods inherited from class io.netty.handler.codec.spdy.DefaultSpdyStreamFrame
isLast, streamId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.netty.handler.codec.spdy.SpdyStreamFrame
isLast, streamId
-
-
-
-
Constructor Detail
-
DefaultSpdyDataFrame
public DefaultSpdyDataFrame(int streamId)
Creates a new instance.- Parameters:
streamId
- the Stream-ID of this frame
-
DefaultSpdyDataFrame
public DefaultSpdyDataFrame(int streamId, io.netty.buffer.ByteBuf data)
Creates a new instance.- Parameters:
streamId
- the Stream-ID of this framedata
- the payload of the frame. Can not exceedSpdyCodecUtil.SPDY_MAX_LENGTH
-
-
Method Detail
-
setStreamId
public SpdyDataFrame setStreamId(int streamId)
Description copied from interface:SpdyStreamFrame
Sets the Stream-ID of this frame. The Stream-ID must be positive.- Specified by:
setStreamId
in interfaceSpdyDataFrame
- Specified by:
setStreamId
in interfaceSpdyStreamFrame
- Overrides:
setStreamId
in classDefaultSpdyStreamFrame
-
setLast
public SpdyDataFrame setLast(boolean last)
Description copied from interface:SpdyStreamFrame
Sets if this frame is the last frame to be transmitted on the stream.- Specified by:
setLast
in interfaceSpdyDataFrame
- Specified by:
setLast
in interfaceSpdyStreamFrame
- Overrides:
setLast
in classDefaultSpdyStreamFrame
-
content
public io.netty.buffer.ByteBuf content()
Description copied from interface:SpdyDataFrame
Returns the data payload of this frame. If there is no data payloadUnpooled.EMPTY_BUFFER
is returned. The data payload cannot exceed 16777215 bytes.- Specified by:
content
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
content
in interfaceSpdyDataFrame
-
copy
public SpdyDataFrame copy()
- Specified by:
copy
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
copy
in interfaceSpdyDataFrame
-
duplicate
public SpdyDataFrame duplicate()
- Specified by:
duplicate
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
duplicate
in interfaceSpdyDataFrame
-
retainedDuplicate
public SpdyDataFrame retainedDuplicate()
- Specified by:
retainedDuplicate
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
retainedDuplicate
in interfaceSpdyDataFrame
-
replace
public SpdyDataFrame replace(io.netty.buffer.ByteBuf content)
- Specified by:
replace
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
replace
in interfaceSpdyDataFrame
-
refCnt
public int refCnt()
- Specified by:
refCnt
in interfaceio.netty.util.ReferenceCounted
-
retain
public SpdyDataFrame retain()
- Specified by:
retain
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Specified by:
retain
in interfaceSpdyDataFrame
-
retain
public SpdyDataFrame retain(int increment)
- Specified by:
retain
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
retain
in interfaceio.netty.util.ReferenceCounted
- Specified by:
retain
in interfaceSpdyDataFrame
-
touch
public SpdyDataFrame touch()
- Specified by:
touch
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Specified by:
touch
in interfaceSpdyDataFrame
-
touch
public SpdyDataFrame touch(Object hint)
- Specified by:
touch
in interfaceio.netty.buffer.ByteBufHolder
- Specified by:
touch
in interfaceio.netty.util.ReferenceCounted
- Specified by:
touch
in interfaceSpdyDataFrame
-
release
public boolean release()
- Specified by:
release
in interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int decrement)
- Specified by:
release
in interfaceio.netty.util.ReferenceCounted
-
-