Package org.glassfish.grizzly.http
Class HttpContext
- java.lang.Object
-
- org.glassfish.grizzly.http.HttpContext
-
- All Implemented Interfaces:
AttributeStorage
public class HttpContext extends java.lang.Object implements AttributeStorage
Represents a single logical HTTP transaction. The target storage provided to the constructor provides a way to look up this transaction at any point in the FilterChain execution.- Since:
- 2.3
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHttpContext(AttributeStorage attributeStorage, OutputSink outputSink, Closeable closeable, HttpRequestPacket request)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpContextattach(FilterChainContext ctx)voidclose()static HttpContextget(FilterChainContext ctx)AttributeHoldergetAttributes()Get associatedAttributeHolder.CloseablegetCloseable()AttributeStoragegetContextStorage()OutputSinkgetOutputSink()HttpRequestPacketgetRequest()static HttpContextnewInstance(AttributeStorage attributeStorage, OutputSink outputSink, Closeable closeable, HttpRequestPacket request)
-
-
-
Constructor Detail
-
HttpContext
protected HttpContext(AttributeStorage attributeStorage, OutputSink outputSink, Closeable closeable, HttpRequestPacket request)
-
-
Method Detail
-
getRequest
public HttpRequestPacket getRequest()
-
attach
public HttpContext attach(FilterChainContext ctx)
-
getAttributes
public final AttributeHolder getAttributes()
Description copied from interface:AttributeStorageGet associatedAttributeHolder. Implementation may return null ifAttributeHolderwasn't initialized yet.- Specified by:
getAttributesin interfaceAttributeStorage- Returns:
- associated
AttributeHolder. Implementation may return null ifAttributeHolderwasn't initialized yet.
-
getContextStorage
public AttributeStorage getContextStorage()
-
getOutputSink
public OutputSink getOutputSink()
-
getCloseable
public Closeable getCloseable()
-
close
public void close()
-
newInstance
public static HttpContext newInstance(AttributeStorage attributeStorage, OutputSink outputSink, Closeable closeable, HttpRequestPacket request)
-
get
public static HttpContext get(FilterChainContext ctx)
-
-