|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.openejb.server.httpd.HttpRequestImpl
A class to take care of HTTP Requests. It parses headers, content, form and url parameters.
| Field Summary | |
protected static String |
EJBSESSIONID
|
static String |
FILENAME
|
static String |
FORM_URL_ENCODED
|
static String |
MULITPART_FORM_DATA
|
static String |
NAME
|
static String |
TEXT_XML
|
| Fields inherited from interface org.openejb.server.httpd.HttpRequest |
CONNECT, DELETE, GET, HEAD, HEADER_ACCEPT, HEADER_ACCEPT_ENCODING, HEADER_ACCEPT_LANGUAGE, HEADER_CACHE_CONTROL, HEADER_CONNECTION, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_COOKIE, HEADER_HOST, HEADER_SET_COOKIE, HEADER_USER_AGENT, OPTIONS, POST, PUT, TRACE, UNSUPPORTED |
| Constructor Summary | |
HttpRequestImpl(URI socketURI)
|
|
| Method Summary | |
Object |
getAttribute(String name)
|
int |
getContentLength()
|
String |
getContentType()
|
protected String |
getCookie(String name)
|
protected HashMap |
getCookies()
|
String |
getFormParameter(String name)
Gets a form parameter based on the name passed in. |
Map |
getFormParameters()
Gets all the form parameters |
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 |
getQueryParameter(String name)
Gets a URL (or query) parameter based on the name passed in. |
Map |
getQueryParameters()
Gets all the 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. |
protected void |
readMessage(InputStream input)
parses the request into the 3 different parts, request, headers, and body |
void |
setAttribute(String name,
Object value)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String FORM_URL_ENCODED
public static final String TEXT_XML
public static final String MULITPART_FORM_DATA
public static final String FILENAME
public static final String NAME
protected static final String EJBSESSIONID
| Constructor Detail |
public HttpRequestImpl(URI socketURI)
| Method Detail |
public String getHeader(String name)
getHeader in interface HttpRequestname - The name of the header to get
public String getFormParameter(String name)
getFormParameter in interface HttpRequestname - The name of the form parameter to get
public Map getFormParameters()
HttpRequest
getFormParameters in interface HttpRequestpublic Map getQueryParameters()
HttpRequest
getQueryParameters in interface HttpRequestpublic String getQueryParameter(String name)
getQueryParameter in interface HttpRequestname - The name of the URL (or query) parameter
public int getMethod()
getMethod in interface HttpRequestpublic URI getURI()
getURI in interface HttpRequestpublic int getContentLength()
getContentLength in interface HttpRequestpublic String getContentType()
getContentType in interface HttpRequest
public InputStream getInputStream()
throws IOException
getInputStream in interface HttpRequestIOException
protected void readMessage(InputStream input)
throws IOException
input - the data input for this page
IOException - if an exception is thrownprotected HashMap getCookies()
protected String getCookie(String name)
public HttpSession getSession(boolean create)
HttpRequestHttpSession 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.
getSession in interface HttpRequestcreate - 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 sessionHttpRequest.getSession()public HttpSession getSession()
HttpRequest
getSession in interface HttpRequestHttpSession associated with this requestHttpRequest.getSession(boolean)public Object getAttribute(String name)
getAttribute in interface HttpRequest
public void setAttribute(String name,
Object value)
setAttribute in interface HttpRequest
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||