Definition at line 69 of file WebServerConnection.java.
Public Member Functions | |
void | init (WebServer webserver, Socket socket) |
void | run () |
Object | getAttribute (String name) |
Returns the value of the named attribute of the request, or null if. | |
Enumeration | getAttributeNames () |
String | getAuthType () |
int | getContentLength () |
Returns the size of the request entity data, or -1 if not known. | |
String | getContentType () |
Returns the MIME type of the request entity data, or null if. | |
String | getContextPath () |
Cookie[] | getCookies () |
long | getDateHeader (String name) |
String | getHeader (String name) |
Enumeration | getHeaderNames () |
Enumeration | getHeaders (String header) |
ServletInputStream | getInputStream () throws IOException |
Returns an input stream for reading request data. | |
int | getIntHeader (String name) |
Returns the value of an integer header field. | |
String | getLocalAddr () |
Returns the Internet Protocol (IP) address of the interface on which the request was received. | |
Enumeration | getLocales () |
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. | |
String | getMethod () |
String | getParameter (String name) |
Returns the value of the specified query string parameter, or null. | |
java.util.Map | getParameterMap () |
Returns a java.util.Map of the parameters of this request. | |
Enumeration | getParameterNames () |
Returns the parameter names for this request. | |
String[] | getParameterValues (String name) |
Returns the values of the specified parameter for the request as an. | |
String | getPathInfo () |
String | getPathTranslated () |
String | getProtocol () |
Returns the protocol and version of the request as a string of. | |
String | getQueryString () |
BufferedReader | getReader () throws IOException |
Returns a buffered reader for reading request data. | |
String | getRealPath (String path) |
Applies alias rules to the specified virtual path and returns the. | |
String | getRemoteAddr () |
Returns the IP address of the agent that sent the request. | |
String | getRemoteHost () |
Returns the fully qualified host name of the agent that sent the. | |
int | getRemotePort () |
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request. | |
String | getRemoteUser () |
Returns the name of the user making this request, or null if not known. | |
RequestDispatcher | getRequestDispatcher (String urlpath) |
String | getRequestedSessionId () |
String | getRequestURI () |
StringBuffer | getRequestURL () |
String | getScheme () |
Returns the scheme of the URL used in this request, for example. | |
String | getServerName () |
Returns the host name of the server as used in the <host> part of. | |
int | getServerPort () |
Returns the port number on which this request was received as used in. | |
String | getServletPath () |
HttpSession | getSession () |
HttpSession | getSession (boolean create) |
Principal | getUserPrincipal () |
boolean | isRequestedSessionIdFromCookie () |
boolean | isRequestedSessionIdFromURL () |
boolean | isRequestedSessionIdFromUrl () |
boolean | isRequestedSessionIdValid () |
boolean | isSecure () |
boolean | isUserInRole (String arg0) |
void | removeAttribute (String name) |
void | setAttribute (String key, Object o) |
void | setCharacterEncoding (String _enc) |
Overrides the name of the character encoding used in the body of this request. | |
String | getCharacterEncoding () |
Returns the character set encoding used for this MIME body. The. | |
Locale | getLocale () |
void | addCookie (Cookie cookie) |
Adds the specified cookie to the response. It can be called. | |
void | addDateHeader (String header, long date) |
void | addHeader (String header, String value) |
void | addIntHeader (String header, int value) |
boolean | containsHeader (String name) |
Checks whether the response message header has a field with the. | |
String | encodeRedirectUrl (String url) |
Encodes the specified URL for use in the sendRedirect method or, if. | |
String | encodeRedirectURL (String url) |
String | encodeUrl (String url) |
Encodes the specified URL by including the session ID in it, or, if. | |
String | encodeURL (String url) |
void | flushBuffer () |
int | getBufferSize () |
ServletOutputStream | getOutputStream () throws IOException |
Returns an output stream for writing response data. | |
PrintWriter | getWriter () throws IOException |
Returns a print writer for writing response data. The MIME type of. | |
boolean | isCommitted () |
Returns a boolean indicating if the response has been committed. | |
void | reset () |
Clears any data that exists in the buffer as well as the status code and headers. | |
void | resetBuffer () |
void | sendError (int resCode, String resMessage) throws IOException |
Writes an error response using the specified status code and message. | |
void | sendError (int resCode) throws IOException |
Writes an error response using the specified status code and a default. | |
void | sendRedirect (String location) throws IOException |
Sends a redirect message to the client using the specified redirect. | |
void | setBufferSize (int size) |
void | setContentLength (int length) |
Sets the content length for this response. | |
void | setContentType (String type) |
Sets the content type for this response. | |
void | setDateHeader (String name, long value) |
Sets the value of a date header field. | |
void | setHeader (String name, String value) |
Sets the value of a header field. | |
void | setIntHeader (String name, int value) |
Sets the value of an integer header field. | |
void | setLocale (Locale locale) |
Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate. | |
void | setStatus (int resCode) |
Sets the status code and a default message for this response. | |
void | setStatus (int resCode, String resMessage) |
Sets the status code and message for this response. | |
Static Public Attributes | |
static final String | WWWFORMURLENCODE = "application/x-www-form-urlencoded" |
static final String | TRANSFERENCODING = "Transfer-Encoding" |
static final String | CHUNKED = "chunked" |
static final String | CONTENTLENGTH = "Content-Length" |
static final String | CONTENTTYPE = "Content-Type" |
Protected Attributes | |
long | connexionLifeTime = 0 |
Static Protected Attributes | |
static final SimpleDateFormat | expdatefmt |
static final SimpleDateFormat | headerdateformat |
Package Functions | |
void | writeHeaders () throws IOException |
Writes the status line and message headers for this response to the. | |
Package Attributes | |
String | reqQuery = null |
String org.openmobileis.embedded.webserver.WebServerConnection.getLocalAddr | ( | ) |
Returns the Internet Protocol (IP) address of the interface on which the request was received.
String
containing the IP address on which the request was received.Definition at line 591 of file WebServerConnection.java.
String org.openmobileis.embedded.webserver.WebServerConnection.getLocalName | ( | ) |
Returns the host name of the Internet Protocol (IP) interface on which the request was received.
String
containing the host name of the IP on which the request was received.Definition at line 611 of file WebServerConnection.java.
int org.openmobileis.embedded.webserver.WebServerConnection.getLocalPort | ( | ) |
Returns the Internet Protocol (IP) port number of the interface on which the request was received.
Definition at line 623 of file WebServerConnection.java.
References org.openmobileis.embedded.webserver.WebServer.port.
java.util.Map org.openmobileis.embedded.webserver.WebServerConnection.getParameterMap | ( | ) |
Returns a java.util.Map of the parameters of this request.
Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.
Definition at line 651 of file WebServerConnection.java.
int org.openmobileis.embedded.webserver.WebServerConnection.getRemotePort | ( | ) |
Returns the Internet Protocol (IP) source port of the client or last proxy that sent the request.
Definition at line 748 of file WebServerConnection.java.
References org.openmobileis.embedded.webserver.WebServer.port.
void org.openmobileis.embedded.webserver.WebServerConnection.setCharacterEncoding | ( | String | _enc | ) |
Overrides the name of the character encoding used in the body of this request.
This method must be called prior to reading request parameters or reading input using getReader().
a | - String containing the name of the chararacter encoding. |
java.io.UnsupportedEncodingException | - if this is not a valid encoding |
Definition at line 906 of file WebServerConnection.java.
boolean org.openmobileis.embedded.webserver.WebServerConnection.isCommitted | ( | ) |
Returns a boolean indicating if the response has been committed.
A commited response has already had its status code and headers written.
Definition at line 1122 of file WebServerConnection.java.
Referenced by org.openmobileis.embedded.webserver.WebServerConnection.reset(), and org.openmobileis.embedded.webserver.WebServerConnection.sendRedirect().
void org.openmobileis.embedded.webserver.WebServerConnection.reset | ( | ) |
Clears any data that exists in the buffer as well as the status code and headers.
If the response has been committed, this method throws an IllegalStateException.
java.lang.IllegalStateException | - if the response has already been committed |
Definition at line 1132 of file WebServerConnection.java.
References org.openmobileis.embedded.webserver.WebServerConnection.isCommitted().
void org.openmobileis.embedded.webserver.WebServerConnection.setLocale | ( | Locale | locale | ) |
Sets the locale of the response, setting the headers (including the Content-Type's charset) as appropriate.
This method should be called before a call to getWriter(). By default, the response locale is the default locale for the server.
loc | - the locale of the response |
Definition at line 1236 of file WebServerConnection.java.