public interface HttpRequestService
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an Object, or null if no attribute of the given name exists.
|
String |
getContextPath()
Returns the context path.
|
String |
getHeader(String name)
Returns the named header as a string, or null if not found.
|
List<String> |
getHeaderNames()
Returns the names of all headers in the request.
|
String |
getLocale()
Returns the locale of the client as determined from the request headers.
|
int |
getLocalPort()
Returns the Internet Protocol (IP) port number of the interface on which the request was received.
|
String |
getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.
|
String |
getParameter(String name)
Returns the query parameter value for the given name.
|
List<String> |
getParameterNames()
Returns a list of query parameter names, in alphabetical order.
|
String[] |
getParameters(String name)
Returns the parameter values for the given name.
|
String |
getPath()
Returns the path portion of the request, which starts with a "/" and contains everything up to the start of the query parameters.
|
String |
getRemoteHost()
Returns the fully qualified name of the client or the last proxy that sent the request.
|
String |
getServerName()
Returns the host name of the server to which the request was sent.
|
int |
getServerPort()
Returns the port number to which the request was sent.
|
Session |
getSession(boolean create)
Gets the
Session |
boolean |
isRequestedSessionIdValid()
Checks whether the requested session ID is still valid.
|
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
|
boolean |
isXHR()
Returns true if the request originated on the client using XmlHttpRequest (the core of any Ajax behavior).
|
void |
setAttribute(String name,
Object value)
Stores an attribute in this request.
|
Object getAttribute(String name)
name
- name of the attributeString getContextPath()
String getHeader(String name)
name
- header nameList<String> getHeaderNames()
List
of header namesString getLocale()
int getLocalPort()
String getMethod()
String getParameter(String name)
name
- parameter namenull
List<String> getParameterNames()
List
of parameter namesString[] getParameters(String name)
name
- array of parameter valuesString
sString getPath()
String getRemoteHost()
String getServerName()
int getServerPort()
Session getSession(boolean create)
Session
create
- determines whether to create session if it does not existSession
objectboolean isRequestedSessionIdValid()
boolean isSecure()
boolean isXHR()
Copyright © 2021 BellaDati Inc.. All rights reserved.