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 a 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 a HTTP header on the request.
|
public ApplicationPushBuilder(Request catalinaRequest, HttpServletRequest request)
public PushBuilder path(java.lang.String path)
javax.servlet.http.PushBuilder
PushBuilder.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 PushBuilder
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.public java.lang.String getPath()
javax.servlet.http.PushBuilder
push()
.getPath
in interface PushBuilder
public PushBuilder method(java.lang.String method)
javax.servlet.http.PushBuilder
method
in interface PushBuilder
method
- The method to use for the push requestpublic java.lang.String getMethod()
javax.servlet.http.PushBuilder
push()
.getMethod
in interface PushBuilder
public PushBuilder queryString(java.lang.String queryString)
javax.servlet.http.PushBuilder
PushBuilder.push()
. This will be appended to any query string
specified in the call to PushBuilder.path(String)
.queryString
in interface PushBuilder
queryString
- The query string to use to generate push requestspublic java.lang.String getQueryString()
javax.servlet.http.PushBuilder
push()
.getQueryString
in interface PushBuilder
public PushBuilder sessionId(java.lang.String sessionId)
javax.servlet.http.PushBuilder
PushBuilder.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:
null
sessionId
in interface PushBuilder
sessionId
- The session ID to use to generate push requestspublic java.lang.String getSessionId()
javax.servlet.http.PushBuilder
push()
.getSessionId
in interface PushBuilder
public PushBuilder addHeader(java.lang.String name, java.lang.String value)
javax.servlet.http.PushBuilder
addHeader
in interface PushBuilder
name
- 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.PushBuilder
setHeader
in interface PushBuilder
name
- The name of the header to setvalue
- The value of the header to setpublic PushBuilder removeHeader(java.lang.String name)
javax.servlet.http.PushBuilder
removeHeader
in interface PushBuilder
name
- The name of the header to removepublic java.util.Set<java.lang.String> getHeaderNames()
getHeaderNames
in interface PushBuilder
push()
is called.public java.lang.String getHeader(java.lang.String name)
javax.servlet.http.PushBuilder
getHeader
in interface PushBuilder
name
- The name of the header whose value is to be returnedpublic void push()
javax.servlet.http.PushBuilder
null
:
path
etag
lastModified
push
in interface PushBuilder
Copyright © 2000-1970 Apache Software Foundation. All Rights Reserved.