|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCADI.Common.Network.HTTP.HTTPRequest
public class HTTPRequest
| Field Summary | |
|---|---|
private java.util.Hashtable<java.lang.String,java.lang.String> |
headers
Contains the HTTP request headers. |
private java.lang.String |
method
Indicates the HTTP request method. |
private java.net.URI |
uri
The requested URI. |
private java.lang.String |
version
Indicates the HTTP version. |
| Constructor Summary | |
|---|---|
HTTPRequest()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addHeader(java.lang.String key,
java.lang.String value)
Adds a new HTTP header. |
java.lang.String |
getHeaderField(java.lang.String name)
Returns the value of the named header field. |
java.util.Enumeration<java.lang.String> |
getHeaders()
Returns an unmodifiable Enumeration of the header names. |
java.util.Hashtable<java.lang.String,java.lang.String> |
getHTTPHeaders()
Returns the headers attribute. |
java.lang.String |
getRequestMethod()
Returns the request method. |
java.lang.String |
getRequestURI()
Returns the request URI. |
java.net.URI |
getURI()
Returns the uri attribute. |
java.lang.String |
getVersion()
Returns the HTTP version. |
void |
list(java.io.PrintStream out)
Prints this HTTPRequest out to the specified output stream. |
void |
reset()
Sets the attributes to its initial values. |
void |
setHeaderField(java.lang.String name,
java.lang.String value)
Puts the value of the named header field. |
void |
setHeaders(java.util.Hashtable<java.lang.String,java.lang.String> headers)
Set the headers attribute. |
void |
setRequestMethod(java.lang.String method)
Sets the method that will be used to send the HTTP request. |
void |
setRequestURI(java.lang.String uri)
Sets the request URI. |
void |
setURI(java.lang.String uri)
|
void |
setURI(java.net.URI uri)
|
void |
setVersion(java.lang.String version)
Sets the HTTP version. |
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 method
private java.net.URI uri
private java.lang.String version
private java.util.Hashtable<java.lang.String,java.lang.String> headers
| Constructor Detail |
|---|
public HTTPRequest()
| Method Detail |
|---|
public void setRequestMethod(java.lang.String method)
method - the method to be used in the HTTP request.
java.net.ProtocolExceptionpublic java.lang.String getRequestMethod()
public void setVersion(java.lang.String version)
version - the HTTP version.public java.lang.String getVersion()
public void setRequestURI(java.lang.String uri)
uri - the request URI.
public void setURI(java.lang.String uri)
throws java.net.URISyntaxException
uri -
java.net.URISyntaxException
public void setURI(java.net.URI uri)
throws java.net.URISyntaxException
uri -
java.net.URISyntaxExceptionpublic java.net.URI getURI()
uri attribute.
uri attribute.public java.lang.String getRequestURI()
public void setHeaders(java.util.Hashtable<java.lang.String,java.lang.String> headers)
headers attribute.
headers - defined in headers.
public void addHeader(java.lang.String key,
java.lang.String value)
key - name the name of the header field.value - the value of the header field.
public void setHeaderField(java.lang.String name,
java.lang.String value)
This method will be deprecated and replaced by the addHeader(String, String).
name - the name of the header field.value - the value of the header field.public java.lang.String getHeaderField(java.lang.String name)
If called on a connection that sets the same header multiple times with possibly different values, only the last value is returned.
name - the name of a header field.
null
if there is no such field in the header.public java.util.Hashtable<java.lang.String,java.lang.String> getHTTPHeaders()
headers attribute.
headers attribute.public java.util.Enumeration<java.lang.String> getHeaders()
The Enumeration keys are Strings that represent the response-header field names.
public void reset()
public java.lang.String toString()
toString in class java.lang.Objectpublic void list(java.io.PrintStream out)
out - an output stream.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||