Package org.glassfish.grizzly.http
Class HttpPacket
- java.lang.Object
-
- org.glassfish.grizzly.http.HttpPacket
-
- All Implemented Interfaces:
org.glassfish.grizzly.Cacheable
- Direct Known Subclasses:
HttpContent,HttpHeader
public abstract class HttpPacket extends Object implements org.glassfish.grizzly.Cacheable
Abstraction, which represents any type of HTTP message:HttpRequestPacket,HttpResponsePacket,HttpContent.- Author:
- Alexey Stashok
- See Also:
HttpRequestPacket,HttpResponsePacket,HttpContent
-
-
Constructor Summary
Constructors Constructor Description HttpPacket()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract HttpHeadergetHttpHeader()Get the HTTP message header, associated with this HTTP packet.abstract booleanisHeader()Returns true, if this HTTP message represents HTTP message header, or false otherwise.static booleanisHttp(Object packet)Returns true if passedObjectis a HttpPacket.
-
-
-
Method Detail
-
isHttp
public static boolean isHttp(Object packet)
Returns true if passedObjectis a HttpPacket.- Parameters:
packet-- Returns:
- true if passed
Objectis a HttpPacket.
-
isHeader
public abstract boolean isHeader()
Returns true, if this HTTP message represents HTTP message header, or false otherwise.- Returns:
- true, if this HTTP message represents HTTP message header, or false otherwise.
-
getHttpHeader
public abstract HttpHeader getHttpHeader()
Get the HTTP message header, associated with this HTTP packet.- Returns:
HttpHeader.
-
-