AdventNet Web NMS 4 DMS API Specification

com.adventnet.nms.extranet.remote.communication.fw.noc
Class SPPNOCHandler
com.adventnet.nms.extranet.remote.communication.fw.noc.SPPNOCHandler
All Implemented Interfaces:
DataTransferID

public class SPPNOCHandler
implements DataTransferID

This class is referred by the modules in the Central Server to register with the communication framework for receiving data and to send the data to the DMS.


Fields inherited from interface com.adventnet.nms.extranet.remote.communication.fw.DataTransferID
ALERT, APPLN_DATA, COLLECT_DATA, COLLECTED_INFO, COMMAND, CONF_UPDATE, CONFIG, DATA_ACK, DOWNLOAD_REQUEST, EVENT, ID_REQUEST, INETSERVICE, MIBBROWSER, PATCH_VERSION, POLLED_DATA, PROBE_STATUS, REGIONAL_SHUTDOWN, SYSLOG, TOPOLOGY
 
Method Summary
 int getBufferSize()
          Returns the size of the data buffer.
 java.util.Hashtable getCommTable()
          Returns the entire communication table.
static SPPNOCHandler getInstance()
          This method gets the reference of a SPPNOCHandler object.
 java.util.HashMap getProbeDetails(java.lang.String probeName)
          * Returns the details(FP & SP details) of the Probe.
 com.adventnet.nms.extranet.remote.communication.fw.noc.SPPNOCSession getSession(java.lang.String regionID)
          This method gets the reference of a SPPNOCSession object corresponding to the ID of the DMS.
 DataObject getStoredData(java.lang.String regionID)
          Returns the stored data corresponding to the DMS of the given ID.
 long getTimeDiff(java.lang.String regionID)
          Returns the difference in time, in seconds, between the Central Server and the distributed mediation server with the given ID.
protected  boolean isValidProbe(java.lang.String probeName)
          Checks if the DMS name is valid.
 org.w3c.dom.Element processIdRequest(org.w3c.dom.Element root)
          Processes the requests from the DMS.
 DataObject processPatchVersionRequest(org.w3c.dom.Element elem)
          Processes Patch version request from the DMS.
 DataObject processRegionIdRequest(org.w3c.dom.Element root)
          Processes the requests from the DMS.
 void publish(DataObject dataObject, java.lang.String regionID)
          Data received from the distributed mediation servers are published to the registered modules.
 void reInitialize()
          This method performs reinitialization.
 void removeSession(java.lang.String regionID)
          Removes the session corresponding to the DMS of the given ID from communication table.
 boolean sendDataToPeer(java.lang.String regionID, DataObject dataObj, int notificationType)
          The DataObject that needs to be transfered to the Central Server from the modules in the DMS can be sent through this method.
 boolean sendDataToPeer(java.lang.String regionID, DataObject dataObj, int notificationType, boolean sendImmediately)
          The DataObject that needs to be transfered to the Central Server from the modules in the DMS can be sent through this method.
 DataObject sendPatchVersionResponse(java.lang.String response, java.lang.String message)
          Sends response about the patch version to DMS.
 DataObject sendShutdownResponse()
          Directs the DMS to shutdown.
 void setProbeDetails(java.lang.String probeName, java.util.HashMap probeDetails)
          Setting the Probe's FP & SP details
 void shutDown()
          Shuts down the Central Server threads.
 

Method Detail

getInstance

public static SPPNOCHandler getInstance()
This method gets the reference of a SPPNOCHandler object. The modules in the Central Server register with the communication framework for receiving and sending data to the DMS.
Returns:
an instance of SPPNOCHandler

getSession

public com.adventnet.nms.extranet.remote.communication.fw.noc.SPPNOCSession getSession(java.lang.String regionID)
This method gets the reference of a SPPNOCSession object corresponding to the ID of the DMS.
Parameters:
return - ID of the DMS.
Returns:
an instance of SPPNOCSession

isValidProbe

protected boolean isValidProbe(java.lang.String probeName)
Checks if the DMS name is valid.
Returns:
true if a valid DMS name is given, else, it returns false.

reInitialize

public void reInitialize()
This method performs reinitialization. Currently this is not implemented. Nothing happens on invoking this method.

sendDataToPeer

public boolean sendDataToPeer(java.lang.String regionID,
                              DataObject dataObj,
                              int notificationType)
The DataObject that needs to be transfered to the Central Server from the modules in the DMS can be sent through this method. The notification type is the unique id for the DataObject from a specific module.
Parameters:
regionID - ID of the DMS.
dataObj - DataObject that has to sent to the DMS.
notificationType - Unique ID for the DataObject.
Returns:
boolean indicating whether the data is successfully sent to the Central Server.

sendDataToPeer

public boolean sendDataToPeer(java.lang.String regionID,
                              DataObject dataObj,
                              int notificationType,
                              boolean sendImmediately)
The DataObject that needs to be transfered to the Central Server from the modules in the DMS can be sent through this method. The notification type is the unique id for the DataObject from a specific module. This method has an additional argument 'sendImmediately' with a boolean value. This is provided for future implementation and is currently not used.
Parameters:
regionID - ID of the DMS.
dataObj - DataObject that has to sent to the DMS.
notificationType - Unique ID for the DataObject.
Returns:
boolean indicating whether the data is successfully sent to the Central Server.

processRegionIdRequest

public DataObject processRegionIdRequest(org.w3c.dom.Element root)
Processes the requests from the DMS.

processIdRequest

public org.w3c.dom.Element processIdRequest(org.w3c.dom.Element root)
Processes the requests from the DMS. Internally used.

sendShutdownResponse

public DataObject sendShutdownResponse()
Directs the DMS to shutdown. This is called when wrong ID or wrong state of DMS is found.
Returns:
DataObject corresponding to the shutdown response.

processPatchVersionRequest

public DataObject processPatchVersionRequest(org.w3c.dom.Element elem)
Processes Patch version request from the DMS. Internally used.

sendPatchVersionResponse

public DataObject sendPatchVersionResponse(java.lang.String response,
                                           java.lang.String message)
Sends response about the patch version to DMS.
Returns:
DataObject corresponding to the response.

publish

public void publish(DataObject dataObject,
                    java.lang.String regionID)
Data received from the distributed mediation servers are published to the registered modules.

getStoredData

public DataObject getStoredData(java.lang.String regionID)
Returns the stored data corresponding to the DMS of the given ID.
Returns:
Stored data as DataObject.

getCommTable

public java.util.Hashtable getCommTable()
Returns the entire communication table.
Returns:
Hashtable holding the communication information.

shutDown

public void shutDown()
Shuts down the Central Server threads.

getTimeDiff

public long getTimeDiff(java.lang.String regionID)
Returns the difference in time, in seconds, between the Central Server and the distributed mediation server with the given ID.
Parameters:
regionID - ID of the DMS.
Returns:
The time differnce in seconds.

removeSession

public void removeSession(java.lang.String regionID)
Removes the session corresponding to the DMS of the given ID from communication table.

getBufferSize

public int getBufferSize()
Returns the size of the data buffer.
Returns:
int specifying size of the buffer.

setProbeDetails

public void setProbeDetails(java.lang.String probeName,
                            java.util.HashMap probeDetails)
Setting the Probe's FP & SP details

getProbeDetails

public java.util.HashMap getProbeDetails(java.lang.String probeName)
* Returns the details(FP & SP details) of the Probe.
Returns:
HashMap contains the FP & SP details

AdventNet Web NMS 4 DMS API Specification