com.monoserv.modules
Class HttpReceiverModule

java.lang.Object
  extended by com.monoserv.modules.BaseModule
      extended by com.monoserv.modules.HttpReceiverModule

public class HttpReceiverModule
extends BaseModule

A HTTP based module that is created for the sole purpose of receiving the HTTP data. It reads in the data, sets the HTTP response code to 200 and adds the required Host parameter.


Constructor Summary
HttpReceiverModule()
          Constructor - blank at the moment.
 
Method Summary
 IModuleData run(IModuleData data)
          Sets up the initial data for HTTP messages.
 void SaveSocket(java.net.Socket sock)
          Used to gather information from the socket to use in the Host header field.
 
Methods inherited from class com.monoserv.modules.BaseModule
end, getInstanceModifier, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpReceiverModule

public HttpReceiverModule()
Constructor - blank at the moment.

Method Detail

run

public IModuleData run(IModuleData data)
                throws java.lang.Exception
Sets up the initial data for HTTP messages. Sets the response code to 200 and the Host header. Thats all.

Overrides:
run in class BaseModule
Parameters:
data - The data from the previous module
Throws:
java.lang.NullPointerException - If the supplied parameter is null.
java.lang.Exception
See Also:
com.monoserv.http.HttpResponse#setHttpResponseCode(int)

SaveSocket

public void SaveSocket(java.net.Socket sock)
Used to gather information from the socket to use in the Host header field. Obtains the port and the Local Socket Address from the Socket object.

Overrides:
SaveSocket in class BaseModule
Parameters:
sock - A Socket that represents the connecting clients connection.