"WEBNMS_5 API Docs"

com.adventnet.nms.startnms
Class MainSocketServerFE

java.lang.Object
  extended by com.adventnet.nms.startnms.MainSocketServerFE
All Implemented Interfaces:
com.adventnet.management.transport.LogInterface, ShutDownObserver, java.lang.Runnable

public class MainSocketServerFE
extends java.lang.Object
implements java.lang.Runnable, ShutDownObserver, com.adventnet.management.transport.LogInterface

This is the server class for the Common Socket or Common RMI API for the client- server communication. All the modules of the Web NMS viz., Topology Database, Maps, Events, Alerts and Poll use the common socket for their client and server communication. Users can plug in their own client and server module in the Web NMS and use this API for their client and server module communication.
Note: For com.adventnet.management.transport.LogInterface and com.adventnet.management.transport.SessionTransportProvider javadocs please refer to the SNMP API java docs.


Constructor Summary
MainSocketServerFE(java.lang.Class trans, java.lang.String[] argv)
           
MainSocketServerFE(java.lang.Class trans, java.lang.String[] argv, boolean isGenericSocket)
           
 
Method Summary
 void dbg(java.lang.String str)
           
 void err(java.lang.String str)
           
 void out(java.lang.String str)
           
 void registerForResponses(SocketServerConnectionFE servClient)
          The modules which want to use the common socket connection should implement the SocketServerConnectionFE interface and use this method to register themselves.
 void run()
          The thread where the Socket accept is done so that client can request for a connection.
 void shutDown()
          Gets called whenever Web NMS Server shuts down.
 void startSession(com.adventnet.management.transport.SessionTransportProvider sstp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainSocketServerFE

public MainSocketServerFE(java.lang.Class trans,
                          java.lang.String[] argv)
                   throws java.lang.Exception
Throws:
java.lang.Exception

MainSocketServerFE

public MainSocketServerFE(java.lang.Class trans,
                          java.lang.String[] argv,
                          boolean isGenericSocket)
                   throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

run

public void run()
The thread where the Socket accept is done so that client can request for a connection.

Specified by:
run in interface java.lang.Runnable

startSession

public void startSession(com.adventnet.management.transport.SessionTransportProvider sstp)

registerForResponses

public void registerForResponses(SocketServerConnectionFE servClient)
The modules which want to use the common socket connection should implement the SocketServerConnectionFE interface and use this method to register themselves. Whenever the client connects to the server, the init() method of the SocketServerConnectionFE is invoked so that the modules can open a separate session and register with the MainSocketSessionFE to process client's requests


shutDown

public void shutDown()
Description copied from interface: ShutDownObserver
Gets called whenever Web NMS Server shuts down. All registered Observers will be notified even before calling shutDown method of all modules

Specified by:
shutDown in interface ShutDownObserver

dbg

public void dbg(java.lang.String str)
Specified by:
dbg in interface com.adventnet.management.transport.LogInterface

err

public void err(java.lang.String str)
Specified by:
err in interface com.adventnet.management.transport.LogInterface

out

public void out(java.lang.String str)
Specified by:
out in interface com.adventnet.management.transport.LogInterface

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.