|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.locomotive.loco.servlet.LocoServletRequest
The Locomotive Servlet Request class provides all the methods in ServletRequest and HttpServletRequest, and also provides a number of useful attributes. See the getAttribute() method for more information.
Inner Class Summary | |
protected class |
LocoServletRequest.RequestInputStream
Simple InputStream class that implements ServletInputStream |
Constructor Summary | |
protected |
LocoServletRequest(int request_id,
java.net.Socket sock,
java.util.Hashtable cgi_envars_hash,
java.util.Hashtable attributes,
java.io.InputStream is,
LocoServletResponse resp,
java.util.Hashtable form_hash,
Session session)
Package protected constructor should be called only by ServletRoutingTable |
Method Summary | |
protected HandlerData |
generateForward()
Will create a HandlerData object with this Request's fields. |
java.lang.Object |
getAttribute(java.lang.String name)
returns the attribute with the specified name, if any. |
java.util.Enumeration |
getAttributeNames()
returns an Enumeration of the names of all the attributes associated with this request. |
java.lang.String |
getAuthType()
Returns the authentification type, if any. |
java.lang.String |
getCharacterEncoding()
Returns the character encoding for the input body of the request, or null if none has been specified. |
int |
getContentLength()
Returns the length of the input content, or -1 if not known |
java.lang.String |
getContentType()
Returns the content (MIME) type of the request body data, or null if not available. |
javax.servlet.http.Cookie[] |
getCookies()
Returns an array of Cookie objects that came in with this request. |
long |
getDateHeader(java.lang.String name)
Returns the value of the requested header converted to a long representing a date expressed in milliseconds since January 1, 1970, 00:00:00GMT. |
java.lang.String |
getDocumentRoot()
Returns the web server's document root filesystem path that was sent in with the request. |
java.lang.String |
getHeader(java.lang.String headerName)
Gets the value of the Header field with the requested name. |
java.util.Enumeration |
getHeaderNames()
This method returns an enumeration of String objects representing the header names for this request. |
javax.servlet.ServletInputStream |
getInputStream()
Returns a ServletInputStream for the request body data. |
int |
getIntHeader(java.lang.String headerName)
Returns an integer representation of the value of the header field with the specified name. |
java.lang.String |
getMethod()
Returns the HTTP method for this request. |
java.lang.String |
getParameter(java.lang.String name)
Returns the value of the input parameter with the specified name |
java.util.Enumeration |
getParameterNames()
Returns an Enumeration of all the form input names. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns an array of all the values for a specified name |
java.lang.String |
getPathInfo()
Returns the path information that preceded the servlet path of this request's URI, if any. |
java.lang.String |
getPathTranslated()
This method gets any extra path information following the servlet path of this request's URL and translates it into a real path. |
java.lang.String |
getProtocol()
Returns the request Protocol- for example, HTTP/1.1. |
java.lang.String |
getQueryString()
Returns the part of the request URI that is a query String, if any. |
java.io.BufferedReader |
getReader()
Returns a BufferedReader of the request body data. |
java.lang.String |
getRealPath(java.lang.String path)
Deprecated. Use ServletContext.getRealPath() instead! |
java.lang.String |
getRemoteAddr()
Returns the IP address of the requestor, or null if not available. |
java.lang.String |
getRemoteHost()
Returns the Host name of the requestor, if available. |
java.lang.String |
getRemoteUser()
Returns the name of the user making this request, if it has been set via HTTP authentification. |
java.lang.String |
getRequestedSessionId()
Returns the session id specified with this request. |
int |
getRequestID()
Returns the unique id for this request. |
java.lang.String |
getRequestURI()
Returns, from the first line of the HTTP request, the part of this request's URL that defines the resource being requested. |
java.lang.String |
getScheme()
Returns the scheme of the URL used for this request- For example: http, https, ftp. |
java.lang.String |
getScriptName()
Returns the "script name". |
java.lang.String |
getServerName()
Returns the server name. |
int |
getServerPort()
Returns the Server Port. |
java.lang.String |
getServletPath()
Returns the part of this request's URI that identifies this the servlet to be invoked. |
javax.servlet.http.HttpSession |
getSession()
Gets the current valid session associated with this request |
javax.servlet.http.HttpSession |
getSession(boolean create)
Gets the current valid session associated with this request, if create is false or, if necessary, creates a new session for the request, if create is true. |
boolean |
isRequestedSessionIdFromCookie()
Checks whether the session id specified by this request came in as a cookie. |
boolean |
isRequestedSessionIdFromUrl()
Deprecated. in favor of isRequestSessionIdFromURL() |
boolean |
isRequestedSessionIdFromURL()
Checks whether the session id specified by this request came in as part of the URL. |
boolean |
isRequestedSessionIdValid()
Checks whether this request is associated with a session that is valid in the current session context. |
void |
setAttribute(java.lang.String name,
java.lang.Object obj)
Sets an attribute with the specified name to the specified object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected LocoServletRequest(int request_id, java.net.Socket sock, java.util.Hashtable cgi_envars_hash, java.util.Hashtable attributes, java.io.InputStream is, LocoServletResponse resp, java.util.Hashtable form_hash, Session session)
request_id
- the RM's unique id for this requestcgi_envars_hash
- the CGI variables for this requestattibutes
- the attributes for this request- set up by
ServletRoutingTable.routeRequestis
- the inputStream to read the request body from, if anyresp
- the resp to use for sending error messagesform_hash
- the parsed form data- leave as null if it isn't parsed
yetsession
- the session object for this requesturl_tokens
- the request URI, tokenifiedMethod Detail |
public int getRequestID()
public java.lang.Object getAttribute(java.lang.String name)
locomotive.bstamp_id A Long containing this browser's unique identity number. locomotive.steam_vars A hashtable which contains STEAM insertion variables locomotive.url_tokens The request URI, in a tokenized format. locomotive.connection A database connection to the default loco DB locomotive.form_data A FormData object containing any form information posted with this request.
The Following are supposed to be included with each Servlet manager, but are not presently part of the Locomotive Servlet Engine:
javax.net.ssl.cipher_suite The string name of the SSL cipher suite in use, if the request was made using SSL javax.net.ssl.peer_certificates The chain of X.509 certificates which authenticates the client. This is only available when SSL is used with client authentication is used. javax.net.ssl.session An SSL session object, if the request was made using SSL.
public java.util.Enumeration getAttributeNames()
public void setAttribute(java.lang.String name, java.lang.Object obj)
public javax.servlet.ServletInputStream getInputStream() throws java.io.IOException
public java.io.BufferedReader getReader() throws java.io.IOException
public java.lang.String getParameter(java.lang.String name)
public java.util.Enumeration getParameterNames()
public java.lang.String[] getParameterValues(java.lang.String name)
public java.lang.String getCharacterEncoding()
public int getContentLength()
public java.lang.String getContentType()
public java.lang.String getProtocol()
public java.lang.String getRemoteAddr()
public java.lang.String getRemoteHost()
public java.lang.String getScheme()
public java.lang.String getServerName()
public int getServerPort()
public java.lang.String getDocumentRoot()
public java.lang.String getScriptName()
public java.lang.String getRealPath(java.lang.String path)
path
- a String specifying a virtual path, in the form
/dir/dir/servlet/file.extpublic javax.servlet.http.Cookie[] getCookies()
public java.lang.String getRequestURI()
javax.servlet.http.HttpRequest#getRequestURI
public java.lang.String getQueryString()
public java.lang.String getServletPath()
public java.lang.String getPathInfo()
public java.lang.String getPathTranslated()
public java.lang.String getRemoteUser()
public java.lang.String getAuthType()
public java.lang.String getMethod()
public java.lang.String getHeader(java.lang.String headerName)
public int getIntHeader(java.lang.String headerName)
public long getDateHeader(java.lang.String name)
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
public java.util.Enumeration getHeaderNames()
public java.lang.String getRequestedSessionId()
public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpSession getSession(boolean create)
public boolean isRequestedSessionIdFromCookie()
public boolean isRequestedSessionIdFromUrl()
public boolean isRequestedSessionIdFromURL()
public boolean isRequestedSessionIdValid()
protected HandlerData generateForward()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |