public interface PushBuilder
HttpServletRequest from which this
builder was obtained. The push request will be constructed on the following
basis:
GET.path(String).HttpServletRequest.getRequestURL() plus, if present, the query
string from HttpServletRequest.getQueryString().
| 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
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
push(). |
PushBuilder |
setHeader(java.lang.String name,
java.lang.String value)
Sets an HTTP header on the request.
|
PushBuilder method(java.lang.String method)
method - The method to use for the push requestjava.lang.IllegalArgumentException - if an HTTP method is specified that is
known not to be cacheable
and safe. POST, PUT, DELETE, CONNECT, OPTIONS and TRACE will
trigger the exception.PushBuilder queryString(java.lang.String queryString)
push(). This will be appended to any query string
specified in the call to path(String).queryString - The query string to use to generate push requestsPushBuilder sessionId(java.lang.String sessionId)
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 - The session ID to use to generate push requestsPushBuilder setHeader(java.lang.String name, java.lang.String value)
name - The name of the header to setvalue - The value of the header to setPushBuilder addHeader(java.lang.String name, java.lang.String value)
name - The name of the header to addvalue - The value of the header to addPushBuilder removeHeader(java.lang.String name)
name - The name of the header to removePushBuilder path(java.lang.String path)
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 - 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.void push()
null:
pathif-none-match and
if-modified-since)java.lang.IllegalStateException - If this method is called when path
is nulljava.lang.IllegalArgumentException - If the request to push requires a bodyjava.lang.String getMethod()
push().java.lang.String getQueryString()
push().java.lang.String getSessionId()
push().java.util.Set<java.lang.String> getHeaderNames()
push() is called.java.lang.String getHeader(java.lang.String name)
name - The name of the header whose value is to be returnedjava.lang.String getPath()
push().Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.