|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpRequest
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 java.lang.String |
HEADER_ACCEPT
the Accept header |
static java.lang.String |
HEADER_ACCEPT_ENCODING
the Accept-Encoding header |
static java.lang.String |
HEADER_ACCEPT_LANGUAGE
the Accept-Language header |
static java.lang.String |
HEADER_CACHE_CONTROL
the Cache-Control header |
static java.lang.String |
HEADER_CONNECTION
the Connection header |
static java.lang.String |
HEADER_CONTENT_LENGTH
the Content-Length header |
static java.lang.String |
HEADER_CONTENT_TYPE
the Content-Type header |
static java.lang.String |
HEADER_COOKIE
the Cookie header |
static java.lang.String |
HEADER_HOST
the Host header |
static java.lang.String |
HEADER_SET_COOKIE
the Set-Cookie header |
static java.lang.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 | |
---|---|
java.lang.Object |
getAttribute(java.lang.String name)
|
int |
getContentLength()
|
java.lang.String |
getContentType()
|
java.lang.String |
getHeader(java.lang.String name)
Gets a header based the header name passed in. |
java.io.InputStream |
getInputStream()
|
int |
getMethod()
Gets an integer value of the request method. |
java.lang.String |
getParameter(java.lang.String name)
Gets a form or URL query parameter based on the name passed in. |
java.util.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. |
java.net.URI |
getURI()
Gets the URI for the current URL page. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
|
Field Detail |
---|
static final int OPTIONS
static final int GET
static final int HEAD
static final int POST
static final int PUT
static final int DELETE
static final int TRACE
static final int CONNECT
static final int UNSUPPORTED
static final java.lang.String HEADER_ACCEPT
static final java.lang.String HEADER_ACCEPT_ENCODING
static final java.lang.String HEADER_ACCEPT_LANGUAGE
static final java.lang.String HEADER_CONTENT_TYPE
static final java.lang.String HEADER_CONTENT_LENGTH
static final java.lang.String HEADER_CONNECTION
static final java.lang.String HEADER_CACHE_CONTROL
static final java.lang.String HEADER_HOST
static final java.lang.String HEADER_USER_AGENT
static final java.lang.String HEADER_SET_COOKIE
static final java.lang.String HEADER_COOKIE
Method Detail |
---|
java.lang.String getParameter(java.lang.String name)
name
- java.util.Map getParameters()
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()
HttpSession getSession()
HttpSession
associated with this requestgetSession(boolean)
java.lang.String getHeader(java.lang.String name)
name
- The name of the header to get
int getMethod()
java.net.URI getURI()
int getContentLength()
java.lang.String getContentType()
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
java.lang.Object getAttribute(java.lang.String name)
void setAttribute(java.lang.String name, java.lang.Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |