|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface to take care of HTTP Requests. It parses headers, content, form and url parameters.
Field Summary | |
static int |
CONNECT
the HTTP CONNECT type |
static int |
DELETE
the HTTP DELETE type |
static int |
GET
the HTTP GET type |
static int |
HEAD
the HTTP HEAD type |
static String |
HEADER_ACCEPT
the Accept header |
static String |
HEADER_ACCEPT_ENCODING
the Accept-Encoding header |
static String |
HEADER_ACCEPT_LANGUAGE
the Accept-Language header |
static String |
HEADER_CACHE_CONTROL
the Cache-Control header |
static String |
HEADER_CONNECTION
the Connection header |
static String |
HEADER_CONTENT_LENGTH
the Content-Length header |
static String |
HEADER_CONTENT_TYPE
the Content-Type header |
static String |
HEADER_COOKIE
the Cookie header |
static String |
HEADER_HOST
the Host header |
static String |
HEADER_SET_COOKIE
the Set-Cookie header |
static String |
HEADER_USER_AGENT
the User-Agent header |
static int |
OPTIONS
the HTTP OPTIONS type |
static int |
POST
the HTTP POST type |
static int |
PUT
the HTTP PUT type |
static int |
TRACE
the HTTP TRACE type |
static int |
UNSUPPORTED
the HTTP UNSUPPORTED type |
Method Summary | |
Object |
getAttribute(String name)
|
int |
getContentLength()
|
String |
getContentType()
|
String |
getHeader(String name)
Gets a header based the header name passed in. |
InputStream |
getInputStream()
|
int |
getMethod()
Gets an integer value of the request method. |
String |
getParameter(String name)
Gets a form or URL query parameter based on the name passed in. |
Map |
getParameters()
Gets all the form and URL query parameters |
HttpSession |
getSession()
Returns the current session associated with this request, or if the request does not have a session, creates one. |
HttpSession |
getSession(boolean create)
Returns the current HttpSession associated with this
request or, if there is no current session and create is
true, returns a new session. |
URI |
getURI()
Gets the URI for the current URL page. |
void |
setAttribute(String name,
Object value)
|
Field Detail |
public static final int OPTIONS
public static final int GET
public static final int HEAD
public static final int POST
public static final int PUT
public static final int DELETE
public static final int TRACE
public static final int CONNECT
public static final int UNSUPPORTED
public static final String HEADER_ACCEPT
public static final String HEADER_ACCEPT_ENCODING
public static final String HEADER_ACCEPT_LANGUAGE
public static final String HEADER_CONTENT_TYPE
public static final String HEADER_CONTENT_LENGTH
public static final String HEADER_CONNECTION
public static final String HEADER_CACHE_CONTROL
public static final String HEADER_HOST
public static final String HEADER_USER_AGENT
public static final String HEADER_SET_COOKIE
public static final String HEADER_COOKIE
Method Detail |
public String getParameter(String name)
name
- public Map getParameters()
public HttpSession getSession(boolean create)
HttpSession
associated with this
request or, if there is no current session and create
is
true, returns a new session.
If create
is false
and the request has no
valid HttpSession
, this method returns null
.
create
- true
to create a new session for this request
if necessary; false
to return null
if there's
no current session
HttpSession
associated with this request or
null
if create
is false
and the
request has no valid sessiongetSession()
public HttpSession getSession()
HttpSession
associated with this requestgetSession(boolean)
public String getHeader(String name)
name
- The name of the header to get
public int getMethod()
public URI getURI()
public int getContentLength()
public String getContentType()
public InputStream getInputStream() throws IOException
IOException
public Object getAttribute(String name)
public void setAttribute(String name, Object value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |