AdventNet Web NMS 4 DMS API Specification

com.adventnet.nms.extranet.remote.communication.fw.probe
Class NOCServerCommAPI
java.lang.Object
  |
  +--com.adventnet.nms.extranet.remote.communication.fw.probe.NOCServerCommAPI

public class NOCServerCommAPI
extends java.lang.Object

This class controls the working on the DMS side. This class is initialized at DMS startup time and only one reference is maintained. To have a control over DMS, various APIs have been provided in this class. A reference of this class is got by calling NOCServerCommAPI.getInstance().


Method Summary
 boolean checkNOCProperties()
          Checks the Central Server properties.
 java.util.Properties getCustomerInfo()
          Returns the information about the Customer given in NOCServerDetails.xml
static NOCServerCommAPI getInstance()
          Returns the reference of this object.
 java.lang.String getNOCServerName()
          Returns the name of the Central Server to which the DMS is connected.
 int getNOCServerPort()
          Returns the port number in the Central Server through which the DMS is connected.
 int getReEstablishInterval()
          Returns the time period in seconds after which the DMS will start communicating again with the Primary Central Server.
 java.lang.String getRegionID()
          Returns the ID with which the DMS is registered with the Central Server.
 int getRetries()
          Returns the count after which the DMS will start communicating with the Standby Central Server once the communication with Primary Central Server fails.
 java.lang.String getStandByNOCServerName()
          Returns the name of the StandBy Central Server to which the DMS will communicate once the primary Central Server is down.
 int getStandByNOCServerPort()
          Returns the port number in the StandBy Central Server through which the DMS will communicate once the primary Central Server is down.
 int getSwitchOverInterval()
          Returns the time period in seconds after which the DMS will start communicating with the Standby Central Server once the communication with Primary Central Server fails.
 boolean isRegionRegistered()
          Checks whether the DMS is registered with the Central Server or not.
 boolean publish(DataObject dataObject)
          Publishes the given DataObject to registered modules.
 boolean registerForNotification(int notificationType, ModuleListener listener)
          Modules register with the communication framework through this method.
 boolean sendData(DataObject dataObject, 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 sendData(DataObject dataObject, int notificationType, int priority)
          The DataObject that needs to be transfered to the Central Server from the modules in the DMS can be sent through this method.
 void setNOCServerName(java.lang.String serverName)
          Sets the primary Central Server's name.
 void setNOCServerPort(int port)
          Sets the primary Central Server port.
 void setReEstablishInterval(int reEstablishInterval)
          Sets the re-establish interval in seconds.
 void setRetries(int retries)
          Sets the retry count.
 void setStandByNOCServerName(java.lang.String serverName)
          Sets the name of stand-by Central Server.
 void setStandByNOCServerPort(int port)
          Sets the port of stand-by Central Server.
 void setSwitchOverInterval(int interval)
          Sets the switch over interval in seconds.
 void shutDownRegion(java.lang.String message)
          Shuts down the DMS.
 void shutDownRegion(java.lang.String message, int exitID)
          Shuts down the DMS.
 void update()
          Updates all information about the Central Server.
 void updateSession()
          Updates the communication session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static NOCServerCommAPI getInstance()
Returns the reference of this object.
Returns:
reference of this object.

checkNOCProperties

public boolean checkNOCProperties()
Checks the Central Server properties. Internally used. Users are not recommended to use this method.
Returns:
validity of the Central Server properties.

getNOCServerName

public java.lang.String getNOCServerName()
Returns the name of the Central Server to which the DMS is connected.
Returns:
The name of the Central Server.

getNOCServerPort

public int getNOCServerPort()
Returns the port number in the Central Server through which the DMS is connected.
Returns:
The port number in the Central Server.

getRegionID

public java.lang.String getRegionID()
Returns the ID with which the DMS is registered with the Central Server.
Returns:
The ID with which the DMS is registered with the Central Server.

getStandByNOCServerName

public java.lang.String getStandByNOCServerName()
Returns the name of the StandBy Central Server to which the DMS will communicate once the primary Central Server is down.
Returns:
The name of the StandBy Central Server.

getStandByNOCServerPort

public int getStandByNOCServerPort()
Returns the port number in the StandBy Central Server through which the DMS will communicate once the primary Central Server is down.
Returns:
The port number in the StandBy Central Server.

getSwitchOverInterval

public int getSwitchOverInterval()
Returns the time period in seconds after which the DMS will start communicating with the Standby Central Server once the communication with Primary Central Server fails.
Returns:
The switch over time in seconds.

getRetries

public int getRetries()
Returns the count after which the DMS will start communicating with the Standby Central Server once the communication with Primary Central Server fails.
Returns:
The retries count.

getReEstablishInterval

public int getReEstablishInterval()
Returns the time period in seconds after which the DMS will start communicating again with the Primary Central Server.
Returns:
The reestablish time in seconds.

setNOCServerName

public void setNOCServerName(java.lang.String serverName)
Sets the primary Central Server's name.

setNOCServerPort

public void setNOCServerPort(int port)
Sets the primary Central Server port.

setStandByNOCServerName

public void setStandByNOCServerName(java.lang.String serverName)
Sets the name of stand-by Central Server.

setStandByNOCServerPort

public void setStandByNOCServerPort(int port)
Sets the port of stand-by Central Server.

setSwitchOverInterval

public void setSwitchOverInterval(int interval)
Sets the switch over interval in seconds.

setRetries

public void setRetries(int retries)
Sets the retry count.

setReEstablishInterval

public void setReEstablishInterval(int reEstablishInterval)
Sets the re-establish interval in seconds.

sendData

public boolean sendData(DataObject dataObject,
                        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. The priority for this DataObject is LOWPRIORITY.

sendData

public boolean sendData(DataObject dataObject,
                        int notificationType,
                        int priority)
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. The DataObject will be handled by the communication framework based on this priority.

registerForNotification

public boolean registerForNotification(int notificationType,
                                       ModuleListener listener)
                                throws java.lang.Exception
Modules register with the communication framework through this method. When the DataObject with this notification type is recieved, the setRequest method will be invoked.

update

public void update()
Updates all information about the Central Server. Currently it is not implemented. Users are not recommended to use this method.

publish

public boolean publish(DataObject dataObject)
Publishes the given DataObject to registered modules.
Returns:
status of this operation.

isRegionRegistered

public boolean isRegionRegistered()
Checks whether the DMS is registered with the Central Server or not.
Returns:
true if the DMS is registered, false if not registered.

updateSession

public void updateSession()
Updates the communication session.

getCustomerInfo

public java.util.Properties getCustomerInfo()
Returns the information about the Customer given in NOCServerDetails.xml
Returns:
Customer information.

shutDownRegion

public void shutDownRegion(java.lang.String message)
Shuts down the DMS. Users are not recommended to use this method.

shutDownRegion

public void shutDownRegion(java.lang.String message,
                           int exitID)
Shuts down the DMS. Users are not recommended to use this method.

AdventNet Web NMS 4 DMS API Specification