Package org.apache.catalina.core
Class ApplicationPushBuilder
- java.lang.Object
- 
- org.apache.catalina.core.ApplicationPushBuilder
 
- 
- All Implemented Interfaces:
- PushBuilder
 
 public class ApplicationPushBuilder extends java.lang.Object implements PushBuilder 
- 
- 
Constructor SummaryConstructors Constructor Description ApplicationPushBuilder(Request catalinaRequest, HttpServletRequest request)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description PushBuilderaddHeader(java.lang.String name, java.lang.String value)Adds an HTTP header to the request.java.lang.StringgetHeader(java.lang.String name)Obtain a value for the given HTTP header.java.util.Set<java.lang.String>getHeaderNames()java.lang.StringgetMethod()Obtain the name of the HTTP method that will be used for push requests generated by future calls topush().java.lang.StringgetPath()Obtain the path that will be used for the push request that will be generated by the next call topush().java.lang.StringgetQueryString()Obtain the query string that will be used for push requests generated by future calls topush().java.lang.StringgetSessionId()Obtain the session ID that will be used for push requests generated by future calls topush().PushBuildermethod(java.lang.String method)Specify the HTTP method to use for the push request.PushBuilderpath(java.lang.String path)Sets the URI path to be used for the push request.voidpush()Generates the push request and sends it to the client unless pushes are not available for some reason.PushBuilderqueryString(java.lang.String queryString)Specifies the query string to use in subsequent push requests generated by a call toPushBuilder.push().PushBuilderremoveHeader(java.lang.String name)Removes an HTTP header from the request.PushBuildersessionId(java.lang.String sessionId)Specifies the session ID to use in subsequent push requests generated by a call toPushBuilder.push().PushBuildersetHeader(java.lang.String name, java.lang.String value)Sets an HTTP header on the request.
 
- 
- 
- 
Constructor Detail- 
ApplicationPushBuilderpublic ApplicationPushBuilder(Request catalinaRequest, HttpServletRequest request) 
 
- 
 - 
Method Detail- 
pathpublic PushBuilder path(java.lang.String path) Description copied from interface:javax.servlet.http.PushBuilderSets the URI path to be used for the push request. This must be called before every call toPushBuilder.push(). If the path includes a query string, the query string will be appended to the existing query string (if any) and no de-duplication will occur.- Specified by:
- pathin interface- PushBuilder
- Parameters:
- path- Paths beginning with '/' are treated as absolute paths. All other paths are treated as relative to the context path of the request used to create this builder instance. The path may include a query string.
- Returns:
- This builder instance
 
 - 
getPathpublic java.lang.String getPath() Description copied from interface:javax.servlet.http.PushBuilderObtain the path that will be used for the push request that will be generated by the next call topush().- Specified by:
- getPathin interface- PushBuilder
- Returns:
- The path value that will be associated with the next push request
 
 - 
methodpublic PushBuilder method(java.lang.String method) Description copied from interface:javax.servlet.http.PushBuilderSpecify the HTTP method to use for the push request.- Specified by:
- methodin interface- PushBuilder
- Parameters:
- method- The method to use for the push request
- Returns:
- This builder instance
 
 - 
getMethodpublic java.lang.String getMethod() Description copied from interface:javax.servlet.http.PushBuilderObtain the name of the HTTP method that will be used for push requests generated by future calls topush().- Specified by:
- getMethodin interface- PushBuilder
- Returns:
- The HTTP method to be used for future push requests
 
 - 
queryStringpublic PushBuilder queryString(java.lang.String queryString) Description copied from interface:javax.servlet.http.PushBuilderSpecifies the query string to use in subsequent push requests generated by a call toPushBuilder.push(). This will be appended to any query string specified in the call toPushBuilder.path(String).- Specified by:
- queryStringin interface- PushBuilder
- Parameters:
- queryString- The query string to use to generate push requests
- Returns:
- This builder instance
 
 - 
getQueryStringpublic java.lang.String getQueryString() Description copied from interface:javax.servlet.http.PushBuilderObtain the query string that will be used for push requests generated by future calls topush().- Specified by:
- getQueryStringin interface- PushBuilder
- Returns:
- The query string that will be appended to push requests.
 
 - 
sessionIdpublic PushBuilder sessionId(java.lang.String sessionId) Description copied from interface:javax.servlet.http.PushBuilderSpecifies the session ID to use in subsequent push requests generated by a call toPushBuilder.push(). The session ID will be presented the same way as it is on the original request (cookie or URL parameter). The default is determined in the following order:- the requested session ID for the originating request
- the session ID generated in the originated request
- null
 - Specified by:
- sessionIdin interface- PushBuilder
- Parameters:
- sessionId- The session ID to use to generate push requests
- Returns:
- This builder instance
 
 - 
getSessionIdpublic java.lang.String getSessionId() Description copied from interface:javax.servlet.http.PushBuilderObtain the session ID that will be used for push requests generated by future calls topush().- Specified by:
- getSessionIdin interface- PushBuilder
- Returns:
- The session that will be used for push requests.
 
 - 
addHeaderpublic PushBuilder addHeader(java.lang.String name, java.lang.String value) Description copied from interface:javax.servlet.http.PushBuilderAdds an HTTP header to the request.- Specified by:
- addHeaderin interface- PushBuilder
- Parameters:
- name- The name of the header to add
- value- The value of the header to add
- Returns:
- This builder instance
 
 - 
setHeaderpublic PushBuilder setHeader(java.lang.String name, java.lang.String value) Description copied from interface:javax.servlet.http.PushBuilderSets an HTTP header on the request. Any existing headers of the same name are first remove.- Specified by:
- setHeaderin interface- PushBuilder
- Parameters:
- name- The name of the header to set
- value- The value of the header to set
- Returns:
- This builder instance
 
 - 
removeHeaderpublic PushBuilder removeHeader(java.lang.String name) Description copied from interface:javax.servlet.http.PushBuilderRemoves an HTTP header from the request.- Specified by:
- removeHeaderin interface- PushBuilder
- Parameters:
- name- The name of the header to remove
- Returns:
- This builder instance
 
 - 
getHeaderNamespublic java.util.Set<java.lang.String> getHeaderNames() - Specified by:
- getHeaderNamesin interface- PushBuilder
- Returns:
- The current set of names of HTTP headers to be used the next time push()is called.
 
 - 
getHeaderpublic java.lang.String getHeader(java.lang.String name) Description copied from interface:javax.servlet.http.PushBuilderObtain a value for the given HTTP header. TODO Servlet 4.0 Clarify the behaviour of this method- Specified by:
- getHeaderin interface- PushBuilder
- Parameters:
- name- The name of the header whose value is to be returned
- Returns:
- The value of the given header. If multiple values are defined then any may be returned
 
 - 
pushpublic void push() Description copied from interface:javax.servlet.http.PushBuilderGenerates the push request and sends it to the client unless pushes are not available for some reason. After calling this method the following fields are set tonull:- path
- conditional request headers (if-none-matchandif-modified-since)
 - Specified by:
- pushin interface- PushBuilder
 
 
- 
 
-