public class ApplicationPushBuilder extends java.lang.Object implements PushBuilder
| Constructor and Description |
|---|
ApplicationPushBuilder(Request catalinaRequest,
HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
PushBuilder |
addHeader(java.lang.String name,
java.lang.String value)
Adds an HTTP header to the request.
|
java.lang.String |
getHeader(java.lang.String name)
Obtain a value for the given HTTP header.
|
java.util.Set<java.lang.String> |
getHeaderNames() |
java.lang.String |
getMethod()
Obtain the name of the HTTP method that will be used for push requests generated by future calls to
push(). |
java.lang.String |
getPath()
Obtain the path that will be used for the push request that will be generated by the next call to
push(). |
java.lang.String |
getQueryString()
Obtain the query string that will be used for push requests generated by future calls to
push(). |
java.lang.String |
getSessionId()
Obtain the session ID that will be used for push requests generated by future calls to
push(). |
PushBuilder |
method(java.lang.String method)
Specify the HTTP method to use for the push request.
|
PushBuilder |
path(java.lang.String path)
Sets the URI path to be used for the push request.
|
void |
push()
Generates the push request and sends it to the client unless pushes are not available for some reason.
|
PushBuilder |
queryString(java.lang.String queryString)
Specifies the query string to use in subsequent push requests generated by a call to
PushBuilder.push(). |
PushBuilder |
removeHeader(java.lang.String name)
Removes an HTTP header from the request.
|
PushBuilder |
sessionId(java.lang.String sessionId)
Specifies the session ID to use in subsequent push requests generated by a call to
PushBuilder.push(). |
PushBuilder |
setHeader(java.lang.String name,
java.lang.String value)
Sets an HTTP header on the request.
|
public ApplicationPushBuilder(Request catalinaRequest, HttpServletRequest request)
public PushBuilder path(java.lang.String path)
javax.servlet.http.PushBuilderPushBuilder.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.path in interface PushBuilderpath - 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.public java.lang.String getPath()
javax.servlet.http.PushBuilderpush().getPath in interface PushBuilderpublic PushBuilder method(java.lang.String method)
javax.servlet.http.PushBuildermethod in interface PushBuildermethod - The method to use for the push requestpublic java.lang.String getMethod()
javax.servlet.http.PushBuilderpush().getMethod in interface PushBuilderpublic PushBuilder queryString(java.lang.String queryString)
javax.servlet.http.PushBuilderPushBuilder.push(). This will
be appended to any query string specified in the call to PushBuilder.path(String).queryString in interface PushBuilderqueryString - The query string to use to generate push requestspublic java.lang.String getQueryString()
javax.servlet.http.PushBuilderpush().getQueryString in interface PushBuilderpublic PushBuilder sessionId(java.lang.String sessionId)
javax.servlet.http.PushBuilderPushBuilder.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:
nullsessionId in interface PushBuildersessionId - The session ID to use to generate push requestspublic java.lang.String getSessionId()
javax.servlet.http.PushBuilderpush().getSessionId in interface PushBuilderpublic PushBuilder addHeader(java.lang.String name, java.lang.String value)
javax.servlet.http.PushBuilderaddHeader in interface PushBuildername - The name of the header to addvalue - The value of the header to addpublic PushBuilder setHeader(java.lang.String name, java.lang.String value)
javax.servlet.http.PushBuildersetHeader in interface PushBuildername - The name of the header to setvalue - The value of the header to setpublic PushBuilder removeHeader(java.lang.String name)
javax.servlet.http.PushBuilderremoveHeader in interface PushBuildername - The name of the header to removepublic java.util.Set<java.lang.String> getHeaderNames()
getHeaderNames in interface PushBuilderpush() is called.public java.lang.String getHeader(java.lang.String name)
javax.servlet.http.PushBuildergetHeader in interface PushBuildername - The name of the header whose value is to be returnedpublic void push()
javax.servlet.http.PushBuildernull:
pathif-none-match and if-modified-since)push in interface PushBuilderCopyright © 2000-2024 Apache Software Foundation.
Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo are either registered trademarks or trademarks of the Apache Software Foundation.