DefaultSpdyDataFrame Class — netty Architecture
Architecture documentation for the DefaultSpdyDataFrame class in DefaultSpdyDataFrame.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe["DefaultSpdyDataFrame"] 5da9a1e2_408e_ed3e_1536_a2588179b58c["DefaultSpdyDataFrame.java"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|defined in| 5da9a1e2_408e_ed3e_1536_a2588179b58c 4b116fc0_faf7_ffce_55dc_41d09bfa97ec["DefaultSpdyDataFrame()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| 4b116fc0_faf7_ffce_55dc_41d09bfa97ec f59beee8_1259_2bc2_8ef6_2b72bc326d1d["ByteBuf()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| f59beee8_1259_2bc2_8ef6_2b72bc326d1d ebfcb15f_d665_a786_cb79_a6e21f43a8af["SpdyDataFrame()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| ebfcb15f_d665_a786_cb79_a6e21f43a8af 753248ef_8805_0fb4_3971_bd701913592d["refCnt()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| 753248ef_8805_0fb4_3971_bd701913592d 99e0e640_57db_69c3_7ada_37e4c64aac57["release()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| 99e0e640_57db_69c3_7ada_37e4c64aac57 8203cd91_180c_aa62_a72e_245c5575acfc["String()"] 1b48ca2e_3d8f_ecd6_e2dc_f3d630f884fe -->|method| 8203cd91_180c_aa62_a72e_245c5575acfc
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/spdy/DefaultSpdyDataFrame.java lines 27–157
public class DefaultSpdyDataFrame extends DefaultSpdyStreamFrame implements SpdyDataFrame {
private final ByteBuf data;
/**
* Creates a new instance.
*
* @param streamId the Stream-ID of this frame
*/
public DefaultSpdyDataFrame(int streamId) {
this(streamId, Unpooled.buffer(0));
}
/**
* Creates a new instance.
*
* @param streamId the Stream-ID of this frame
* @param data the payload of the frame. Can not exceed {@link SpdyCodecUtil#SPDY_MAX_LENGTH}
*/
public DefaultSpdyDataFrame(int streamId, ByteBuf data) {
super(streamId);
this.data = validate(
ObjectUtil.checkNotNull(data, "data"));
}
private static ByteBuf validate(ByteBuf data) {
if (data.readableBytes() > SpdyCodecUtil.SPDY_MAX_LENGTH) {
throw new IllegalArgumentException("data payload cannot exceed "
+ SpdyCodecUtil.SPDY_MAX_LENGTH + " bytes");
}
return data;
}
@Override
public SpdyDataFrame setStreamId(int streamId) {
super.setStreamId(streamId);
return this;
}
@Override
public SpdyDataFrame setLast(boolean last) {
super.setLast(last);
return this;
}
@Override
public ByteBuf content() {
return ByteBufUtil.ensureAccessible(data);
}
@Override
public SpdyDataFrame copy() {
return replace(content().copy());
}
@Override
public SpdyDataFrame duplicate() {
return replace(content().duplicate());
}
@Override
public SpdyDataFrame retainedDuplicate() {
return replace(content().retainedDuplicate());
}
@Override
public SpdyDataFrame replace(ByteBuf content) {
SpdyDataFrame frame = new DefaultSpdyDataFrame(streamId(), content);
frame.setLast(isLast());
return frame;
}
@Override
public int refCnt() {
return data.refCnt();
}
@Override
public SpdyDataFrame retain() {
data.retain();
return this;
Source
Frequently Asked Questions
What is the DefaultSpdyDataFrame class?
DefaultSpdyDataFrame is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/spdy/DefaultSpdyDataFrame.java.
Where is DefaultSpdyDataFrame defined?
DefaultSpdyDataFrame is defined in codec-http/src/main/java/io/netty/handler/codec/spdy/DefaultSpdyDataFrame.java at line 27.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free