"WEBNMS_5 API Docs"

com.adventnet.nms.startnms
Interface SocketServerConnectionFE


public interface SocketServerConnectionFE

All WebNMS modules which uses the common connection should implement this interface and register with the MainSocketServerFE. An ideal implementation of this interface will be:

   public class MyModuleServerFE implements SocketServerConnectionFE
   {
     public MyModuleServerFE()
     {
       //registering with the MainSocketServerFE to listen for any client connection.
       PureServerUtilsFE.serverSocketFE.registerForResponses(this);
     }
     // handles the client connection routine.
     public void init(MainSocketSessionFE mss)
     {
       // This session is instantiated for each client connection. The mss reference
       // is used for further communication with this module's client counterpart.
       MyModuleSession mysession = new MyModuleSession(mss);
     }
   }
 
The init() method of this implementation class will be invoked when the client connects to the server. The MainSocketSessionFE, which is created by the Web NMS FE server on each client connection is passed to the init() method. The MainSocketSessionFE is the basic or single point communication interface for the Web NMS FE Server with the Web NMS Client.The module sessions can register with this for receiving any of this module's client requests. Also, the MainSocketSessionFE will be used for sending the response for the thus recieved request using mss.send();

See Also:
SocketSessionConnectionFE, MainSocketSessionFE, MainSocketServerFE, PureServerUtilsFE

Method Summary
 void init(MainSocketSessionFE mss)
          This method will be invoked by the Web NMS FE server on every Client connection.
 

Method Detail

init

void init(MainSocketSessionFE mss)
This method will be invoked by the Web NMS FE server on every Client connection. The FE server creates a Client Session (an instance of class MainSocketSessionFE) and passes on the same to this method. The SocketServerConnectionFE implementations are expected to spawn a new module sessions (ie., instantiate a class which implement the SocketSessionConnectionFE interface) and register these sessions with the MainSocketSessionFE for further communication with that particular client.

Parameters:
mss - The client session created by the FE Server.

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.