Class Http2Flags
java.lang.Object
io.netty.handler.codec.http2.Http2Flags
Provides utility methods for accessing specific flags as defined by the HTTP/2 spec.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanack()Determines whether the flag is set indicating that this frame is an ACK.ack(boolean ack) Sets theACKflag.booleanDetermines whether theEND_HEADERSflag is set.endOfHeaders(boolean endOfHeaders) Sets theEND_HEADERSflag.booleanDetermines whether theEND_STREAMflag is set.endOfStream(boolean endOfStream) Sets theEND_STREAMflag.booleanintGets the number of bytes expected for the priority fields of the payload.intGets the length in bytes of the padding presence field expected in the payload.inthashCode()booleanisFlagSet(short mask) Indicates whether or not a particular flag is set.booleanFor frames that include padding, indicates if thePADDEDfield is present.paddingPresent(boolean paddingPresent) Sets thePADDEDflag.booleanDetermines whether the flag is set indicating the presence of the exclusive, stream dependency, and weight fields in a HEADERS frame.priorityPresent(boolean priorityPresent) Sets thePRIORITYflag.setFlag(boolean on, short mask) Generic method to set any flag.toString()shortvalue()Gets the underlying flags value.
-
Field Details
-
END_STREAM
public static final short END_STREAM- See Also:
-
END_HEADERS
public static final short END_HEADERS- See Also:
-
ACK
public static final short ACK- See Also:
-
PADDED
public static final short PADDED- See Also:
-
PRIORITY
public static final short PRIORITY- See Also:
-
-
Constructor Details
-
Http2Flags
public Http2Flags() -
Http2Flags
public Http2Flags(short value)
-
-
Method Details
-
value
public short value()Gets the underlying flags value. -
endOfStream
public boolean endOfStream()Determines whether theEND_STREAMflag is set. Only applies to DATA and HEADERS frames. -
endOfHeaders
public boolean endOfHeaders()Determines whether theEND_HEADERSflag is set. Only applies for HEADERS, PUSH_PROMISE, and CONTINUATION frames. -
priorityPresent
public boolean priorityPresent()Determines whether the flag is set indicating the presence of the exclusive, stream dependency, and weight fields in a HEADERS frame. -
ack
public boolean ack()Determines whether the flag is set indicating that this frame is an ACK. Only applies for SETTINGS and PING frames. -
paddingPresent
public boolean paddingPresent()For frames that include padding, indicates if thePADDEDfield is present. Only applies to DATA, HEADERS, PUSH_PROMISE and CONTINUATION frames. -
getNumPriorityBytes
public int getNumPriorityBytes()Gets the number of bytes expected for the priority fields of the payload. This is determined by thepriorityPresent()flag. -
getPaddingPresenceFieldLength
public int getPaddingPresenceFieldLength()Gets the length in bytes of the padding presence field expected in the payload. This is determined by thepaddingPresent()flag. -
endOfStream
Sets theEND_STREAMflag. -
endOfHeaders
Sets theEND_HEADERSflag. -
priorityPresent
Sets thePRIORITYflag. -
paddingPresent
Sets thePADDEDflag. -
ack
Sets theACKflag. -
setFlag
Generic method to set any flag.- Parameters:
on- if the flag should be enabled or disabled.mask- the mask that identifies the bit for the flag.- Returns:
- this instance.
-
isFlagSet
public boolean isFlagSet(short mask) Indicates whether or not a particular flag is set.- Parameters:
mask- the mask identifying the bit for the particular flag being tested- Returns:
trueif the flag is set
-
hashCode
-
equals
-
toString
-