|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProtocolExtension
An interface to a protocol specific extension of a servlet request. It is saved as a request attribute using its class name.
Nested Class Summary | |
---|---|
static class |
ProtocolExtension.Encoding
Encoding of linked URLs. |
static class |
ProtocolExtension.Relativity
Relativity of linked URLs. |
Field Summary | |
---|---|
static String |
KEY
The extension key. |
Method Summary | |
---|---|
void |
encodeLinkedURL(StringBuilder builder,
ProtocolExtension.Encoding encoding)
Encodes the linked URL as specified. |
StringBuilder |
getLinkedURL(String location,
OrderedMap<String,Object> info)
Gets a URL link to the specified location with additional URL parameters. |
StringBuilder |
getLinkedURL(String location,
ProtocolExtension.Relativity relativity,
OrderedMap<String,Object> info)
Gets an optionally absolute URL link to the specified location with additional URL parameters. |
StringBuilder |
getLinkedURL(String location,
ProtocolExtension.Relativity relativity,
String... info)
Gets an optionally absolute URL link to the specified location. |
StringBuilder |
getLinkedURL(String location,
String... info)
Gets a URL link to the specified location. |
int |
getMaxAge()
Gets the max caching age of pages in clients. |
String |
getPathTail()
Gets the tail of the path info without parsed and requested parameters. |
StringBuilder |
getRedirectedURL(boolean secure,
String... info)
Gets a redirected URL link, which is either secure or non-secure. |
StringBuilder |
getRedirectedURL(String location,
boolean secure,
OrderedMap<String,Object> info)
Gets a redirected URL link with additional URL parameters, which is either secure or non-secure. |
StringBuilder |
getRedirectedURL(String location,
boolean secure,
String... info)
Gets a redirected URL link, which is either secure or non-secure. |
StringBuilder |
getRedirectedURL(String host,
int port,
String location,
boolean secure,
OrderedMap<String,Object> info)
Gets a redirected URL link with additional URL parameters to the specified host and/or port, which is either secure or non-secure. |
StringBuilder |
getRedirectedURL(String host,
int port,
String location,
boolean secure,
String... info)
Gets a redirected URL link to a specific host and/or port, which is either secure or non-secure. |
StringBuilder |
getRedirectedURL(String location,
OrderedMap<String,Object> info)
Gets a redirected URL link with additional URL parameters. |
StringBuilder |
getRedirectedURL(String location,
String... info)
Gets a redirected URL link to the specified location. |
int |
getRedirectionCode()
Gets the redirection code to apply for this request. |
String |
getRedirectionURL()
Gets the redirection URL of this request. |
HttpFilter.SessionIdPolicy |
getSessionIdPolicy()
Gets the session id policy. |
int |
getStatus()
Gets the status code of the response. |
String |
getURLAuthentication()
Gets the URL authentication of this request. |
Principal |
getUserPrincipal()
Gets the authenticated principal that is registered to the session of this request. |
boolean |
isAbsoluteURLLinks()
Gets the absolute URL links option. |
boolean |
isNoCache()
Checks whether caching of pages in clients is on or off. |
boolean |
isPathInfoParsed()
Gets the path info to be parsed as parameters option. |
boolean |
isRedirection()
Checks whether this request is a redirection. |
boolean |
isUnparsedPath()
Checks whether the path info doesn't contain any parsed and requested parameters. |
HttpSession |
registerUserPrincipal(Principal principal)
Registers the authenticated principal to the session of this request. |
void |
setMaxAge(int secs)
Sets the max caching age of pages in clients. |
void |
setNoCache(boolean flag)
Sets whether caching of pages in clients is on or off. |
void |
setNoCache(boolean flag,
long expires)
Sets whether caching of pages in clients is on or off with expiration. |
void |
setRedirection(boolean flag)
Sets whether this request is a redirection. |
void |
setRedirectionURL(String url)
Sets the redirection URL of this request. |
void |
setStatus(int code)
Sets the status code of the response. |
Field Detail |
---|
static final String KEY
Method Detail |
---|
String getPathTail()
boolean isUnparsedPath()
boolean isRedirection()
void setRedirection(boolean flag)
flag
- true if a redirection, otherwise false.String getRedirectionURL()
void setRedirectionURL(String url)
url
- the redirection URL.int getRedirectionCode()
String getURLAuthentication()
boolean isAbsoluteURLLinks()
boolean isPathInfoParsed()
HttpFilter.SessionIdPolicy getSessionIdPolicy()
StringBuilder getLinkedURL(String location, String... info)
If the location is an absolute URL, it is converted into a string buffer as such.
An absolute path is appended to the context URL of the current request. The authority component is included if URL links are configured to be absolute.
A relative path is appended to the context URL after the path info parameters of linked key filters or before the corresponding query string parameters depending on the configuration.
location
- the encoded location of the link.info
- an array of unencoded URL parameters.
StringBuilder getLinkedURL(String location, ProtocolExtension.Relativity relativity, String... info)
location
- the encoded location of the link.relativity
- the relativity of the location.info
- an array of unencoded URL parameters.
StringBuilder getLinkedURL(String location, OrderedMap<String,Object> info)
Applied parameters from linked key filters are inserted to the URL parameter map, if any.
location
- the encoded location of the link.info
- a map of unencoded URL parameters.
StringBuilder getLinkedURL(String location, ProtocolExtension.Relativity relativity, OrderedMap<String,Object> info)
location
- the encoded location of the link.relativity
- the relativity of the location.info
- a map of unencoded URL parameters.
StringBuilder getRedirectedURL(boolean secure, String... info)
secure
- true for a secure link, false otherwise.info
- an array of unencoded URL parameters.
StringBuilder getRedirectedURL(String location, String... info)
If the location is an absolute URL, it is converted into a string buffer as such.
An absolute path is appended to the servlet URL of the current request.
A relative path is appended to the servlet URL after the path info parameters of linked key filters or before the corresponding query string parameters depending on the configuration.
location
- the encoded location of the link.info
- an array of unencoded URL parameters.
StringBuilder getRedirectedURL(String location, OrderedMap<String,Object> info)
Applied parameters from linked key filters are inserted to the URL parameter map, if any.
location
- the encoded location of the link.info
- a map of unencoded URL parameters.
StringBuilder getRedirectedURL(String location, boolean secure, String... info)
location
- the encoded location of the link.secure
- true for a secure link, false otherwise.info
- an array of unencoded URL parameters.
StringBuilder getRedirectedURL(String location, boolean secure, OrderedMap<String,Object> info)
Applied parameters from linked key filters are inserted to the URL parameter map, if any.
location
- the encoded location of the link.secure
- true for a secure link, false otherwise.info
- a map of unencoded URL parameters.
StringBuilder getRedirectedURL(String host, int port, String location, boolean secure, String... info)
host
- the optional server name of the link.port
- the port number of the link (0 for current).location
- the encoded location of the link.secure
- true for a secure link, false otherwise.info
- an array of unencoded URL parameters.
StringBuilder getRedirectedURL(String host, int port, String location, boolean secure, OrderedMap<String,Object> info)
Applied parameters from linked key filters are inserted to the URL parameter map, if any.
host
- the optional server name of the link.port
- the port number of the link (0 for current).location
- the encoded location of the link.secure
- true for a secure link, false otherwise.info
- a map of unencoded URL parameters.
void encodeLinkedURL(StringBuilder builder, ProtocolExtension.Encoding encoding)
builder
- the linked URL.encoding
- the encoding.boolean isNoCache()
void setNoCache(boolean flag)
flag
- true if caching is disabled, false if enabled.void setNoCache(boolean flag, long expires)
flag
- true if caching is disabled, false if enabled.expires
- the expiration in msecs (0 = always, -1 = never).int getMaxAge()
void setMaxAge(int secs)
secs
- the max age in seconds (-1 = forever).int getStatus()
void setStatus(int code)
code
- the status code.Principal getUserPrincipal()
HttpSession registerUserPrincipal(Principal principal)
principal
- the authenticated principal.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |