net.user1.union.module
Class MaxConcurrentConnection

java.lang.Object
  extended by net.user1.union.module.MaxConcurrentConnection
All Implemented Interfaces:
Module

public class MaxConcurrentConnection
extends java.lang.Object
implements Module

A module that only allows a configurable number of clients with the same connection address to connect concurrently.


Constructor Summary
MaxConcurrentConnection()
           
 
Method Summary
 boolean init(ModuleContext ctx)
          Called when the module is initialized.
 void onClientDisconnect(ServerEvent evt)
           
 void onConnection(ConnectionEvent evt)
           
 void shutdown()
          Called when the module is shutdown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxConcurrentConnection

public MaxConcurrentConnection()
Method Detail

init

public boolean init(ModuleContext ctx)
Description copied from interface: Module
Called when the module is initialized. Use this method to perform any custom initialization in the module code. If the module code cannot perform initialization successfully then this method should return false which will cause the room to not be deployed to the server.

Specified by:
init in interface Module
Returns:
false if the module failed to initialize, otherwise true.

onConnection

public void onConnection(ConnectionEvent evt)

onClientDisconnect

public void onClientDisconnect(ServerEvent evt)

shutdown

public void shutdown()
Description copied from interface: Module
Called when the module is shutdown. Use this method to cleanup any resources created by the module.

Specified by:
shutdown in interface Module


Copyright USER1 Subsystems Corporation - Tue Jan 28 2014, 05:05 PM -0500