Package com.iizix.server.modules
Interface IServerModule<OBJECT>
- All Known Implementing Classes:
- LoadBalancer
public interface IServerModule<OBJECT>
Interface implemented by a server module that wish to implement an end-point and act as a remote party accepter. Typical use for modules are e.g. load balancing and license manager.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- void- dispose()Disposes of this server module.Gets the description.Gets the name of the module.- initialize- (IServer server) Initializes the module end point constructor.- void- onServerReady- (IServer server) Called when the server is ready.- default int- processServerArg- (String[] args, String param, int index) Processes command line arguments for the module in question.
- Method Details- processServerArgProcesses command line arguments for the module in question.- Parameters:
- args- The arguments on the command line.
- param- The parameter is lower case, generally starting with "-" or "/".
- index- The next argument to read, might not be present- if ( ii >= args.length ).
- Returns:
- The number of arguments processed, zero for none.
 
- getModuleNameString getModuleName()Gets the name of the module.- Returns:
- A name such as "Load Balancer" or "License Manager".
 
- getModuleDescripionString getModuleDescripion()Gets the description.- Returns:
- A descriptive text of the module such a "Load Balancer for servers in the co.iizi.* domain" or "Backup License Manager for com.domain.LicMan".
 
- initializeInitializes the module end point constructor.- Parameters:
- server- The server instance.
- Returns:
- The end point constructor.
- Throws:
- Exception- For failures: the module will not be used...
 
- onServerReadyCalled when the server is ready. A server module that wishes to listen to when the server is going to be disposed can do so using- IServer.addDisposeListener(com.iizix.server.IServerDisposeListener)at this stage.- Parameters:
- server- The server instance.
 
- disposevoid dispose()Disposes of this server module. After dispose is called and- dispose()has been called, the end point constructor is automatically removed and disposed of.