com.monoserv.modules
Class HttpHelloWorldTextModule

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

public class HttpHelloWorldTextModule
extends BaseModule

Example module created for the sole purpose of examplifying the module communication and data passing. Does nothing than sets the body of the HttpDataModule's HttpResponse object to "Hello World - Im inside the HttpHelloWorldTextModule". Also sets the content length for this.


Constructor Summary
HttpHelloWorldTextModule()
          Constructor - does nothing (blank).
 
Method Summary
 IModuleData run(IModuleData data)
          Appends the text to the HTTP data.
 
Methods inherited from class com.monoserv.modules.BaseModule
end, getInstanceModifier, SaveSocket, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpHelloWorldTextModule

public HttpHelloWorldTextModule()
Constructor - does nothing (blank).

Method Detail

run

public IModuleData run(IModuleData data)
                throws java.lang.NullPointerException
Appends the text to the HTTP data. No checks, no additional logic. Just calls the setMessageBody for the HttpResponse. Also adds the "Content-length" parameters to the HTTP headers.

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