com.monoserv.interfaces
Interface IModule


public interface IModule

Module interface. Simple methods to describe the life of a request. More on this later.


Method Summary
 void end()
          This is called at the end right before the connection is closed.
 InstanceModifier getInstanceModifier()
          Returns an InstanceModifier object for determining if we need to take any kind of automated action after everything is said and done.
 IModuleData run(IModuleData data)
          Called after start...
 void SaveSocket(java.net.Socket sock)
          This is called with a copy of the accepted socket for the connection
 void start()
          Called to prep any information if needed
 

Method Detail

start

void start()
           throws java.lang.Exception
Called to prep any information if needed

Throws:
java.lang.Exception - If an error occurs

run

IModuleData run(IModuleData data)
                throws java.lang.Exception
Called after start... only called once. The module is responsible for creating its own threads and ending them for communication.

Parameters:
data - The data to pass to the module
Returns:
IModuleData The data to be passed to the next module (or back to the client).
Throws:
java.lang.Exception - If an error occurs.

end

void end()
         throws java.lang.Exception
This is called at the end right before the connection is closed.

Throws:
java.lang.Exception - If an error occurs.

SaveSocket

void SaveSocket(java.net.Socket sock)
This is called with a copy of the accepted socket for the connection

Parameters:
sock - The accepted socket from the server to be used for communication.

getInstanceModifier

InstanceModifier getInstanceModifier()
Returns an InstanceModifier object for determining if we need to take any kind of automated action after everything is said and done.

Returns:
InstanceModifier An InstanceModifier object.