Class Http2Frame
java.lang.Object
org.glassfish.grizzly.http2.frames.Http2Frame
- All Implemented Interfaces:
Cacheable
- Direct Known Subclasses:
DataFrame,GoAwayFrame,HeaderBlockFragment,PingFrame,PriorityFrame,RstStreamFrame,SettingsFrame,UnknownFrame,WindowUpdateFrame
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final booleanstatic final intprotected Bufferprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract intvoidclearFlag(int flag) intgetFlags()intintabstract intgetType()booleanisFlagSet(int flag) protected voidThe method should be invoked once packet payload is updatedvoidrecycle()protected voidserializeFrameHeader(Buffer buffer) voidsetFlag(int flag) protected voidsetFlags(int flags) Sets flags for the frame.protected voidsetFrameBuffer(Buffer frameBuffer) protected voidsetStreamId(int streamId) Sets the stream ID associated with the data frame.toBuffer()abstract BuffertoBuffer(MemoryManager memoryManager) toString()
-
Field Details
-
FRAME_HEADER_SIZE
public static final int FRAME_HEADER_SIZE- See Also:
-
DONT_RECYCLE
protected static final boolean DONT_RECYCLE -
length
protected int length -
frameBuffer
-
-
Constructor Details
-
Http2Frame
protected Http2Frame()
-
-
Method Details
-
toBuffer
-
toBuffer
-
isFlagSet
public boolean isFlagSet(int flag) -
setFlag
public void setFlag(int flag) -
clearFlag
public void clearFlag(int flag) -
getFlags
public int getFlags()- Returns:
- flags for the frame. Only the first 8 bits are relevant.
-
setFlags
protected void setFlags(int flags) Sets flags for the frame. Only the first 8 bits are relevant.- Parameters:
flags- the flags for this frame
-
getLength
public int getLength()- Returns:
- the length of this frame.
-
calcLength
protected abstract int calcLength()- Returns:
- the length of this frame.
-
getFlagNamesMap
- Returns:
- the
Mapwith flag bit - to - flag name mapping
-
onPayloadUpdated
protected void onPayloadUpdated()The method should be invoked once packet payload is updated -
getType
public abstract int getType()- Returns:
- the type of the frame.
-
getStreamId
public int getStreamId()- Returns:
- the stream ID associated with the frame.
-
setStreamId
protected void setStreamId(int streamId) Sets the stream ID associated with the data frame.- Parameters:
streamId- the stream ID of this frame.
-
toString
-
headerToString
-
setFrameBuffer
-
serializeFrameHeader
-
recycle
public void recycle()
-