org.enhydra.servlet.connectionMethods.EnhydraDirector
Class DirectorRequest

java.lang.Object
  extended byorg.apache.catalina.connector.Request
      extended byorg.enhydra.servlet.connectionMethods.EnhydraDirector.DirectorRequest
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest

public class DirectorRequest
extends org.apache.catalina.connector.Request

Enhydra Director implementation of the request.

Author:
Milin Radivoj

Field Summary
protected  EnhydraDirectorConnection connection
           
protected  org.apache.catalina.connector.Response wrapedResponse
           
 
Fields inherited from class org.apache.catalina.connector.Request
attributes, authType, CACHED_POST_LEN, connector, context, cookies, cookiesParsed, coyoteRequest, defaultLocale, dispatcherType, facade, filterChain, formats, GMT_ZONE, info, inputBuffer, inputStream, localAddr, locales, localesParsed, localName, localPort, mappingData, parameterMap, parametersParsed, postData, reader, remoteAddr, remoteHost, remotePort, requestDispatcherPath, requestedSessionCookie, requestedSessionId, requestedSessionURL, response, secure, session, sessionParsed, sm, subject, URIConverter, userPrincipal, usingInputStream, usingReader, wrapper
 
Fields inherited from interface javax.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
Constructor Summary
DirectorRequest(EnhydraDirectorConnection req)
           
 
Method Summary
 void addCookie(javax.servlet.http.Cookie cookie)
          Add a Cookie to the set of Cookies associated with this Request.
 void addHeader(java.lang.String name, java.lang.String value)
          Add a Header to the set of Headers associated with this Request.
 void addParameter(java.lang.String name, java.lang.String[] values)
          Add a parameter name and corresponding set of values to this Request.
 void clearCookies()
          Clear the collection of Cookies associated with this Request.
 void clearHeaders()
          Clear the collection of Headers associated with this Request.
 void clearParameters()
          Clear the collection of parameters associated with this Request.
protected  void configureSessionCookie(javax.servlet.http.Cookie cookie)
           
 javax.servlet.ServletInputStream createInputStream()
          Create and return a ServletInputStream to read the content associated with this Request.
 void decodeURL()
           
protected  org.apache.catalina.Session doGetSession(boolean create)
          Return the session associated with this Request, creating one if necessary and requested.
 void finishRequest()
          Perform whatever actions are required to close the input stream
 java.lang.Object getAttribute(java.lang.String name)
          Return request attribute if it exists
 java.util.Enumeration getAttributeNames()
          Return the names of all request attributes for this Request
 java.lang.String getAuthorization()
          Return the authorization credentials sent with this request.
 java.lang.String getAuthType()
          Get the Auth Type associated with this Request.
 java.lang.String getCharacterEncoding()
          Return the Character Encoding associated with this Request.
 int getContentLength()
          Return the Content Length associated with this Request.
 java.lang.String getContentType()
          Return the Content Type associated with this Request.
 javax.servlet.http.Cookie[] getCookies()
          Get cookies associated with this Request.
 long getDateHeader(java.lang.String name)
          Return the Date Header with the specified name associated with this Request.
 java.lang.String getDecodedRequestURI()
           
 java.lang.String getHeader(java.lang.String name)
          Return the Header with the specified name associated with this Request.
 java.util.Enumeration getHeaderNames()
          Return the Header names associated with this Request.
 java.util.Enumeration getHeaders(java.lang.String name)
          Return the Header names with the specified name associated with this Request.
 java.lang.String getInfo()
          Return descriptive information about this Request implementation
 javax.servlet.ServletInputStream getInputStream()
          Return the servlet input stream for this Request.
 int getIntHeader(java.lang.String name)
          Return the Int Header with the specified name associated with this Request.
 java.lang.String getLocalAddr()
          Returns the Internet Protocol (IP) address of the interface on which the request was received.
 java.lang.String getLocalName()
          Returns the host name of the Internet Protocol (IP) interface on which the request was received.
 int getLocalPort()
          Returns the Internet Protocol (IP) port number of the interface on which the request was received.
 java.lang.String getMethod()
          Get the method associated with this Request.
 java.lang.String getParameter(java.lang.String name)
          Return the parameter with the specified name
 java.util.Enumeration getParameterNames()
          Return the parameter names
 java.lang.String[] getParameterValues(java.lang.String name)
          Return the parameter values
 java.lang.String getProtocol()
          Return the Protocol associated with this Request.
 java.lang.String getQueryString()
          Get the Query String associated with this Request.
 java.io.BufferedReader getReader()
          Read the Reader wrapping the input stream for this Request.
 java.lang.String getRemoteAddr()
          Return the remote IP address making this Request.
 java.lang.String getRemoteHost()
          Return the remote host name making this Request.
 int getRemotePort()
          Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
 java.lang.String getRemoteUser()
          Get the Remote User associated with this Request.
 java.lang.String getRequestedSessionId()
           
 java.lang.String getRequestURI()
          Get the Requested URI associated with this Request.
 java.lang.StringBuffer getRequestURL()
          Get the Requested URL associated with this Request.
 java.lang.String getScheme()
          Return the scheme used to make this Request.
 java.lang.String getServerName()
          Return the Server Name
 int getServerPort()
          Return the Server Port
 javax.servlet.http.HttpSession getSession(boolean create)
           
 org.apache.catalina.Session getSessionInternal()
           
 org.apache.catalina.Session getSessionInternal(boolean create)
           
 java.io.InputStream getStream()
          Return the input stream associated with this Request.
 boolean isRequestedSessionIdFromCookie()
           
 boolean isRequestedSessionIdFromURL()
          Return true if the session identifier included in this request came from the request URI.
 boolean isRequestedSessionIdValid()
           
 void obtainSessionId()
           
 void recycle()
          Release all object references, and initialize instance variables, in preparation for reuse of this object.
 void removeAttribute(java.lang.String name)
          Remove request attribute
 void setAttribute(java.lang.String name, java.lang.Object value)
          Set request attribute to the specified value
 void setAuthorization(java.lang.String authorization)
          Set the authorization credentials sent with this request.
 void setAuthType(java.lang.String type)
          Set the authentication type used for this request
 void setCharacterEncoding(java.lang.String env)
          Set the Character Encoding associated with this Request.
 void setContentLength(int length)
          Set the content length associated with this Request.
 void setContentType(java.lang.String type)
          Set the content type associated with this Request.
 void setDecodedRequestURI(java.lang.String uri)
          Set the decoded request URI.
 void setMethod(java.lang.String method)
          Set the HTTP request method used for this Request.
 void setProtocol(java.lang.String protocol)
          Set the protocol name and version associated with this Request.
 void setQueryString(java.lang.String query)
          Set the query string for this Request
 void setRemoteAddr(java.lang.String remote)
          Set the remote IP address associated with this Request.
 void setRequestedSessionCookie(boolean flag)
          Return true if the session identifier included in this request came from a cookie.
 void setRequestedSessionId(java.lang.String id)
           
 void setRequestedSessionURL(boolean flag)
           
 void setRequestURI(java.lang.String uri)
          Set the unparsed request URI for this Request.
 void setScheme(java.lang.String scheme)
          Set the name of the scheme associated with this request.
 void setServerName(java.lang.String name)
          Set the name of the server (virtual host) to process this request.
 void setServerPort(int port)
          Set the port number of the server to process this request.
 void setStream(java.io.InputStream stream)
          Set the input stream associated with this Request.
 void setUserPrincipal(java.security.Principal principal)
           
 
Methods inherited from class org.apache.catalina.connector.Request
addLocale, clearLocales, getConnector, getContext, getContextPath, getContextPathMB, getCoyoteRequest, getDecodedRequestURIMB, getFilterChain, getHost, getLocale, getLocales, getMappingData, getNote, getNoteNames, getParameterMap, getPathInfo, getPathInfoMB, getPathTranslated, getPrincipal, getRealPath, getRequest, getRequestDispatcher, getRequestPathMB, getResponse, getServletPath, getServletPathMB, getSession, getURIConverter, getUserPrincipal, getWrapper, isRequestedSessionIdFromUrl, isSecure, isUserInRole, parseCookies, parseLocales, parseLocalesHeader, parseParameters, readPostBody, removeNote, setConnector, setContext, setContextPath, setCookies, setCoyoteRequest, setFilterChain, setHost, setNote, setPathInfo, setRemoteHost, setResponse, setSecure, setServletPath, setURIConverter, setWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

connection

protected EnhydraDirectorConnection connection

wrapedResponse

protected org.apache.catalina.connector.Response wrapedResponse
Constructor Detail

DirectorRequest

public DirectorRequest(EnhydraDirectorConnection req)
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
Return request attribute if it exists


setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.Object value)
Set request attribute to the specified value


removeAttribute

public void removeAttribute(java.lang.String name)
Remove request attribute


getAttributeNames

public java.util.Enumeration getAttributeNames()
Return the names of all request attributes for this Request


getLocalPort

public int getLocalPort()
Returns the Internet Protocol (IP) port number of the interface on which the request was received.


getRemotePort

public int getRemotePort()
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.


getLocalAddr

public java.lang.String getLocalAddr()
Returns the Internet Protocol (IP) address of the interface on which the request was received.


setUserPrincipal

public void setUserPrincipal(java.security.Principal principal)

getLocalName

public java.lang.String getLocalName()
Returns the host name of the Internet Protocol (IP) interface on which the request was received.


setRequestedSessionCookie

public void setRequestedSessionCookie(boolean flag)
Return true if the session identifier included in this request came from a cookie.


setRequestedSessionId

public void setRequestedSessionId(java.lang.String id)

setRequestedSessionURL

public void setRequestedSessionURL(boolean flag)

getRequestedSessionId

public java.lang.String getRequestedSessionId()

isRequestedSessionIdFromCookie

public boolean isRequestedSessionIdFromCookie()

isRequestedSessionIdFromURL

public boolean isRequestedSessionIdFromURL()
Return true if the session identifier included in this request came from the request URI.


doGetSession

protected org.apache.catalina.Session doGetSession(boolean create)
Return the session associated with this Request, creating one if necessary and requested.


getSessionInternal

public org.apache.catalina.Session getSessionInternal()

getSessionInternal

public org.apache.catalina.Session getSessionInternal(boolean create)

getSession

public javax.servlet.http.HttpSession getSession(boolean create)

configureSessionCookie

protected void configureSessionCookie(javax.servlet.http.Cookie cookie)

obtainSessionId

public void obtainSessionId()

decodeURL

public void decodeURL()

getAuthorization

public java.lang.String getAuthorization()
Return the authorization credentials sent with this request.


setAuthorization

public void setAuthorization(java.lang.String authorization)
Set the authorization credentials sent with this request.


getInfo

public java.lang.String getInfo()
Return descriptive information about this Request implementation


getStream

public java.io.InputStream getStream()
Return the input stream associated with this Request.


setStream

public void setStream(java.io.InputStream stream)
Set the input stream associated with this Request.


createInputStream

public javax.servlet.ServletInputStream createInputStream()
                                                   throws java.io.IOException
Create and return a ServletInputStream to read the content associated with this Request.

Throws:
java.io.IOException

finishRequest

public void finishRequest()
                   throws java.io.IOException
Perform whatever actions are required to close the input stream

Throws:
java.io.IOException

recycle

public void recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.


setContentLength

public void setContentLength(int length)
Set the content length associated with this Request.


setContentType

public void setContentType(java.lang.String type)
Set the content type associated with this Request.


setProtocol

public void setProtocol(java.lang.String protocol)
Set the protocol name and version associated with this Request.


setRemoteAddr

public void setRemoteAddr(java.lang.String remote)
Set the remote IP address associated with this Request.


setScheme

public void setScheme(java.lang.String scheme)
Set the name of the scheme associated with this request.


setServerName

public void setServerName(java.lang.String name)
Set the name of the server (virtual host) to process this request.


setServerPort

public void setServerPort(int port)
Set the port number of the server to process this request.

Parameters:
port - The server port

addCookie

public void addCookie(javax.servlet.http.Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request.


addHeader

public void addHeader(java.lang.String name,
                      java.lang.String value)
Add a Header to the set of Headers associated with this Request.


addParameter

public void addParameter(java.lang.String name,
                         java.lang.String[] values)
Add a parameter name and corresponding set of values to this Request.


clearCookies

public void clearCookies()
Clear the collection of Cookies associated with this Request.


clearHeaders

public void clearHeaders()
Clear the collection of Headers associated with this Request.


clearParameters

public void clearParameters()
Clear the collection of parameters associated with this Request.


setAuthType

public void setAuthType(java.lang.String type)
Set the authentication type used for this request


setMethod

public void setMethod(java.lang.String method)
Set the HTTP request method used for this Request.


setQueryString

public void setQueryString(java.lang.String query)
Set the query string for this Request


setRequestURI

public void setRequestURI(java.lang.String uri)
Set the unparsed request URI for this Request.


getDecodedRequestURI

public java.lang.String getDecodedRequestURI()

setDecodedRequestURI

public void setDecodedRequestURI(java.lang.String uri)
Set the decoded request URI.

Parameters:
uri - The decoded request URI

getAuthType

public java.lang.String getAuthType()
Get the Auth Type associated with this Request.


getCookies

public javax.servlet.http.Cookie[] getCookies()
Get cookies associated with this Request.


getDateHeader

public long getDateHeader(java.lang.String name)
Return the Date Header with the specified name associated with this Request.


getHeader

public java.lang.String getHeader(java.lang.String name)
Return the Header with the specified name associated with this Request.


getHeaders

public java.util.Enumeration getHeaders(java.lang.String name)
Return the Header names with the specified name associated with this Request.


getHeaderNames

public java.util.Enumeration getHeaderNames()
Return the Header names associated with this Request.


getIntHeader

public int getIntHeader(java.lang.String name)
Return the Int Header with the specified name associated with this Request.


getMethod

public java.lang.String getMethod()
Get the method associated with this Request.


getQueryString

public java.lang.String getQueryString()
Get the Query String associated with this Request.


getRemoteUser

public java.lang.String getRemoteUser()
Get the Remote User associated with this Request.


getRequestURI

public java.lang.String getRequestURI()
Get the Requested URI associated with this Request.


getRequestURL

public java.lang.StringBuffer getRequestURL()
Get the Requested URL associated with this Request.


isRequestedSessionIdValid

public boolean isRequestedSessionIdValid()

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Return the Character Encoding associated with this Request.


setCharacterEncoding

public void setCharacterEncoding(java.lang.String env)
                          throws java.io.UnsupportedEncodingException
Set the Character Encoding associated with this Request.

Throws:
java.io.UnsupportedEncodingException

getContentLength

public int getContentLength()
Return the Content Length associated with this Request.


getContentType

public java.lang.String getContentType()
Return the Content Type associated with this Request.


getInputStream

public javax.servlet.ServletInputStream getInputStream()
                                                throws java.io.IOException
Return the servlet input stream for this Request.

Throws:
java.io.IOException

getParameter

public java.lang.String getParameter(java.lang.String name)
Return the parameter with the specified name


getParameterNames

public java.util.Enumeration getParameterNames()
Return the parameter names


getParameterValues

public java.lang.String[] getParameterValues(java.lang.String name)
Return the parameter values


getProtocol

public java.lang.String getProtocol()
Return the Protocol associated with this Request.


getScheme

public java.lang.String getScheme()
Return the scheme used to make this Request.


getServerName

public java.lang.String getServerName()
Return the Server Name


getServerPort

public int getServerPort()
Return the Server Port


getReader

public java.io.BufferedReader getReader()
                                 throws java.io.IOException
Read the Reader wrapping the input stream for this Request.

Throws:
java.io.IOException

getRemoteAddr

public java.lang.String getRemoteAddr()
Return the remote IP address making this Request.


getRemoteHost

public java.lang.String getRemoteHost()
Return the remote host name making this Request.