|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Server.Network.HTTPRequestDecoder
public class HTTPRequestDecoder
This class implements an HTTP request decoder.
Usage example:
constructor
decoder
get methods
reset
decoder
get methods
reset
....
| Field Summary | |
|---|---|
private HTTPRequest |
httpRequest
This object contains the decoded HTTP request fields. |
private static java.util.Set |
httpRequestHeaders
|
private static java.lang.String[] |
httpRequestHeadersList
Allowed HTTP request headers |
private static java.util.Set |
methods
|
private static java.lang.String[] |
methodsList
Allowed HTTP methods |
private java.lang.String |
requestLine
Contains the HTTP request line |
| Fields inherited from interface CADI.Common.Network.HTTP.StatusCodes |
|---|
ACCEPTED, BAD_REQUEST, NOT_FOUND, NOT_IMPLEMENTED, OK, SERVICE_UNAVAILABLE, UNSUPPORTED_MEDIA_TYPE |
| Fields inherited from interface CADI.Common.Defaults.ImageReturnTypes |
|---|
JPP_STREAM, JPT_STREAM, MAX_IMAGE_RETURN_TYPES_ALLOWED, RAW |
| Constructor Summary | |
|---|---|
HTTPRequestDecoder()
Constructor. |
|
| Method Summary | |
|---|---|
private void |
decoder(java.lang.String requestLine,
java.util.Hashtable<java.lang.String,java.lang.String> headers)
Decodes the HTTP request. |
void |
decoderBak(HTTPRequest request)
Decodes the HTTP request. |
HTTPRequest |
getHTTPRequest()
Returns the httpRequest attribue. |
java.lang.String |
getHTTPVersion()
Returns the HTTP version. |
java.lang.String |
getMethod()
Returns the HTTP method. |
java.lang.String |
getRequestURI()
Returns the last requested URI. |
void |
list(java.io.PrintStream out)
Prints this HTTPRequestDecoder out to the specified output stream. |
void |
reset()
Sets the class atributes to initial values. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String requestLine
private HTTPRequest httpRequest
private static final java.lang.String[] methodsList
private static final java.util.Set methods
methodsListprivate static final java.lang.String[] httpRequestHeadersList
private static final java.util.Set httpRequestHeaders
httpRequestHeadersList| Constructor Detail |
|---|
public HTTPRequestDecoder()
| Method Detail |
|---|
public void decoderBak(HTTPRequest request)
throws ErrorException
request -
WarningException - this exception will be thrown if
ErrorExceptionpublic void reset()
public java.lang.String getMethod()
HTTPRequest.getRequestMethod()
method.
public java.lang.String getRequestURI()
public java.lang.String getHTTPVersion()
HTTPRequest.getVersion()
method.
public HTTPRequest getHTTPRequest()
httpRequest attribue.
httpRequest attribute.public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
private void decoder(java.lang.String requestLine,
java.util.Hashtable<java.lang.String,java.lang.String> headers)
throws ErrorException
requestLine - the HTTP request line to be decoded.headers - headers of the HTTP request.
WarningException - this exception will be thrown if
ErrorException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||