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
A FilterChainEvent to trigger an HTTP/2 push promise and trigger a new request to be sent upstream to generate a response for said push promise.
  • Field Details

    • TYPE

      public static final Object TYPE
  • Method Details

    • type

      public Object type()
      Specified by:
      type in interface org.glassfish.grizzly.filterchain.FilterChainEvent
    • create

      public static PushEvent create(PushBuilder builder)
      Construct a new PushEvent based on the values contained within the provided PushBuilder.
    • 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 HttpRequestPacket of 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.PushEventBuilder for constructing a PushEvent with all of the necessary values to generate a push and container request.