Class PushEvent
- java.lang.Object
-
- org.glassfish.grizzly.http.server.http2.PushEvent
-
- All Implemented Interfaces:
org.glassfish.grizzly.filterchain.FilterChainEvent
public class PushEvent extends Object implements org.glassfish.grizzly.filterchain.FilterChainEvent
AFilterChainEventto trigger an HTTP/2 push promise and trigger a new request to be sent upstream to generate a response for said push promise.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPushEvent.PushEventBuilderConstruct a newPushEvent.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PushEvent.PushEventBuilderbuilder()static PushEventcreate(PushBuilder builder)Construct a newPushEventbased on the values contained within the providedPushBuilder.org.glassfish.grizzly.http.util.MimeHeadersgetHeaders()org.glassfish.grizzly.http.HttpHeadergetHttpRequest()StringgetMethod()StringgetPath()voidrecycle()This should be called by the entity generating the actual push and container requests.Objecttype()
-
-
-
Field Detail
-
TYPE
public static final Object TYPE
-
-
Method Detail
-
type
public Object type()
- Specified by:
typein interfaceorg.glassfish.grizzly.filterchain.FilterChainEvent
-
create
public static PushEvent create(PushBuilder builder)
Construct a newPushEventbased on the values contained within the providedPushBuilder.
-
getMethod
public String getMethod()
- Returns:
- the HTTP Method of the push request.
-
getHeaders
public org.glassfish.grizzly.http.util.MimeHeaders getHeaders()
- Returns:
- the headers of the push request.
-
getPath
public String getPath()
- Returns:
- the path of the push request.
-
getHttpRequest
public org.glassfish.grizzly.http.HttpHeader getHttpRequest()
- Returns:
- the
HttpRequestPacketof the original request. This is necessary in order to lookup the parent stream.
-
recycle
public void recycle()
This should be called by the entity generating the actual push and container requests. Developers using this event can ignore this.
-
builder
public static PushEvent.PushEventBuilder builder()
- Returns:
- a new
PushEvent.PushEventBuilderfor constructing aPushEventwith all of the necessary values to generate a push and container request.
-
-