anon.infoservice
Class HttpRequestStructure

java.lang.Object
  extended by anon.infoservice.HttpRequestStructure

public final class HttpRequestStructure
extends java.lang.Object

This class describes an HTTP request.


Field Summary
static int HTTP_COMMAND_GET
          This is the constant for the http get command.
static int HTTP_COMMAND_POST
          This is the constant for the http post command.
private  int m_httpCommand
          The command of the http request this HttpCommandStructure is used for.
private  java.lang.String m_httpFileName
          The filename on the HTTP server which is requested.
private  org.w3c.dom.Document m_postDocument
          An XML document with data which is posted to the HTTP server.
 
Constructor Summary
private HttpRequestStructure(int a_httpCommand, java.lang.String a_httpFileName, org.w3c.dom.Document a_postDocument)
          Creates a new HttpRequestStructure instance.
 
Method Summary
static HttpRequestStructure createGetRequest(java.lang.String a_httpFileName)
          Creates a new HTTP GET request.
static HttpRequestStructure createPostRequest(java.lang.String a_httpFileName, org.w3c.dom.Document a_postDocument)
          Creates a new HTTP POST request.
 int getRequestCommand()
          Returns the command of the http request this HttpCommandStructure is used for.
 java.lang.String getRequestFileName()
          Returns the filename on the HTTP server which is requested.
 org.w3c.dom.Document getRequestPostDocument()
          Returns the data which shall be posted to the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_COMMAND_GET

public static final int HTTP_COMMAND_GET
This is the constant for the http get command.

See Also:
Constant Field Values

HTTP_COMMAND_POST

public static final int HTTP_COMMAND_POST
This is the constant for the http post command.

See Also:
Constant Field Values

m_httpCommand

private int m_httpCommand
The command of the http request this HttpCommandStructure is used for. See the constants in this class.


m_httpFileName

private java.lang.String m_httpFileName
The filename on the HTTP server which is requested.


m_postDocument

private org.w3c.dom.Document m_postDocument
An XML document with data which is posted to the HTTP server. For the get method or for posting no data, this value is null.

Constructor Detail

HttpRequestStructure

private HttpRequestStructure(int a_httpCommand,
                             java.lang.String a_httpFileName,
                             org.w3c.dom.Document a_postDocument)
Creates a new HttpRequestStructure instance.

Parameters:
a_httpCommand - The command of the http request the new HttpCommandStructure is used for. See the constants in this class.
a_httpFileName - The filename on the HTTP server which is requested.
a_postDocument - An XML document with data which is posted to the HTTP server. For the get method or for posting no data, this value is null.
Method Detail

createGetRequest

public static HttpRequestStructure createGetRequest(java.lang.String a_httpFileName)
Creates a new HTTP GET request.

Parameters:
a_httpFileName - The filename on the HTTP server which is requested.
Returns:
An HttpRequestStructure which encapsulates an HTTP get request.

createPostRequest

public static HttpRequestStructure createPostRequest(java.lang.String a_httpFileName,
                                                     org.w3c.dom.Document a_postDocument)
Creates a new HTTP POST request.

Parameters:
a_httpFileName - The filename on the HTTP server which is requested.
a_postDocument - An XML document which is posted to the HTTP server. If this is null, an empty post request is done.
Returns:
An HttpRequestStructure which encapsulates an HTTP post request.

getRequestCommand

public int getRequestCommand()
Returns the command of the http request this HttpCommandStructure is used for. See the constants in this class.

Returns:
The HTTP command of this request.

getRequestFileName

public java.lang.String getRequestFileName()
Returns the filename on the HTTP server which is requested.

Returns:
The requested filename.

getRequestPostDocument

public org.w3c.dom.Document getRequestPostDocument()
Returns the data which shall be posted to the server. If this request is a GET request, this value is null. If it is a POST request, this is the XML document to post to the server, if it is null, an empty post shall be done.

Returns:
The XML document to post to the server.