WebNMS 5 API Specification

com.adventnet.beans.configuration
Class MSConfigurator

java.lang.Object
  |
  +--com.adventnet.beans.configuration.MSConfigurator
All Implemented Interfaces:
com.adventnet.management.ExceptionListener
Direct Known Subclasses:
MOConfigurator, MSDeviceConfigurator

public abstract class MSConfigurator
extends java.lang.Object
implements com.adventnet.management.ExceptionListener

This abstract class is the base class for the component MSDeviceConfigurator and MOConfigurator. This class stores all the group infomation that are to be Configured. This class sets up TCP connection to the ManagementServer. This connection is used by its subclasses to perform the Configuration.


Field Summary
protected  java.applet.Applet applet
           
protected  boolean debug
           
protected  java.lang.String debugInstanceName
           
protected  java.util.Vector infoCacheVec
           
protected  com.adventnet.management.ManagementServices mc
           
protected  java.lang.String serverHostName
           
protected  java.lang.String serverPortNum
           
 
Constructor Summary
MSConfigurator()
          Default Constructor.
MSConfigurator(java.applet.Applet appletArg)
          Applet Constructor.
 
Method Summary
 void addGroup(MSGroupInfoCache groupInfoCacheArg)
          Adds the GroupInformation to the list of groups to be configured.
 void addGroup(java.lang.String groupNameArg, ConfigInfo infoArg, java.lang.Object[] objArrArg)
          Adds the GroupInformation to the list of groups to be configured.
 void addGroups(java.lang.String[] groupNameArr, ConfigInfo[] infoArr, java.lang.Object[] objArr)
          Adds all the group information to the list of groups to be configured.
 void addGroups(java.lang.String[] groupNameArr, ConfigInfo infoArg, java.lang.Object[] objArr)
          Adds all the group information to the list of groups to be configured.
 void addMSGroupInfoCaches(MSGroupInfoCache[] infoCachesArg)
          Adds the GroupInformation to the list of groups to be configured.
protected  void debug(java.lang.Object messageArg)
           
 void dispose()
          Method to stop the ManagementClient.
 boolean getDebug()
          Returns debug value.
 java.lang.String getDebugName()
          Returns the debug name that is set.
 java.lang.String getServerHostName()
          Returns the ManagementServer host name.
 java.lang.String getServerPortNum()
          Returns the ManagementServer port number.
abstract  void processException(com.adventnet.management.Property p, java.lang.Exception exp)
           
 void resetAll()
          Clears all the groups added to the MSConfigurator
 void setDebug(boolean bool)
          Sets the debug value.
 void setDebugName(java.lang.String name)
          Sets the debug name to be displayed.
 void setServerHostName(java.lang.String serverHostNameArg)
          Sets the name of the machine, where the ManageemntServer is running
.
 void setServerPortNum(java.lang.String serverPortNumArg)
          Sets the port number, where the ManagementServer is running
.
protected  void setUpManagementClient()
          Sets up the ManagementClient for communicating with the ManagementServer.
abstract  void startConfiguration()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applet

protected java.applet.Applet applet

serverHostName

protected java.lang.String serverHostName

serverPortNum

protected java.lang.String serverPortNum

mc

protected com.adventnet.management.ManagementServices mc

infoCacheVec

protected java.util.Vector infoCacheVec

debug

protected boolean debug

debugInstanceName

protected java.lang.String debugInstanceName
Constructor Detail

MSConfigurator

public MSConfigurator()
Default Constructor.

MSConfigurator

public MSConfigurator(java.applet.Applet appletArg)
Applet Constructor.
Method Detail

getServerHostName

public java.lang.String getServerHostName()
Returns the ManagementServer host name.
Returns:
'String'

getServerPortNum

public java.lang.String getServerPortNum()
Returns the ManagementServer port number.
Returns:
'String'

setServerHostName

public void setServerHostName(java.lang.String serverHostNameArg)
Sets the name of the machine, where the ManageemntServer is running
. This property need not be set
: i) When the MangementApplication is of type JavaApplicartion and the ManagementServer is running at the same host, where the application is running
. ii) When the ManagementApplication is of type JavaApplet
. Note: To satisfy the above conditions, the MangementServer should run at the host where the applet is downloaded.
Parameters:
serverHostNameArg - Device name where the ManagementServer is running.

setServerPortNum

public void setServerPortNum(java.lang.String serverPortNumArg)
Sets the port number, where the ManagementServer is running
. This property need not be set
: i) When the ManagementServer is running at 7050
. ii) When the Management Application is of type Java Application and the ManagementServer is running at the same host and the directory, where the application is running
. iii) When the Management Application is of type JavaApplet
. Note : To satisfy the above conditions, the ManagementServer must run in the host where the applet is downloaded and in the directory where the webserver is running
. This is because, when the ManagementServer is started without any specification of port, it starts in the available free port. The port where it got started is written in the file "MSSocketPort.html" under the html directory.
If the port is not given, MSConfigurator searches the html directory in the webserver base to get the file "MSSocketPort.html"
.
Parameters:
serverPortNumArg - Device port number where the ManagementServer is running.

resetAll

public void resetAll()
Clears all the groups added to the MSConfigurator

addGroup

public void addGroup(java.lang.String groupNameArg,
                     ConfigInfo infoArg,
                     java.lang.Object[] objArrArg)
              throws java.lang.Exception
Adds the GroupInformation to the list of groups to be configured.
Parameters:
groupNameArg - Name of the group to be added.
infoArg - The configInfo name where the group present.
objArrArg - User defined array that will be passed to the following methods of infoArg : getConfigValueFor , getConfigIndexFor , getUserStringArrayToSave and validateConfigGroup .

addGroups

public void addGroups(java.lang.String[] groupNameArr,
                      ConfigInfo[] infoArr,
                      java.lang.Object[] objArr)
               throws java.lang.Exception
Adds all the group information to the list of groups to be configured.
Parameters:
groupNameArr - Array of groups to be added.
infoArr - The configInfo name where the correponding group is present.
objArrArg - User defined array that will be passed to the following methods of infoArg : getConfigValueFor , getConfigIndexFor , getUserStringArrayToSave and validateConfigGroup .

addGroups

public void addGroups(java.lang.String[] groupNameArr,
                      ConfigInfo infoArg,
                      java.lang.Object[] objArr)
               throws java.lang.Exception
Adds all the group information to the list of groups to be configured.
Parameters:
groupNameArr - Array of groups to be added.
infoArr - The configInfo name where the groups present.
objArrArg - User defined array that will be passed to the following methods of infoArg : getConfigValueFor , getConfigIndexFor , getUserStringArrayToSave and validateConfigGroup .

addGroup

public void addGroup(MSGroupInfoCache groupInfoCacheArg)
Adds the GroupInformation to the list of groups to be configured.
Parameters:
groupInfoCacheArg - Specific group information.

addMSGroupInfoCaches

public void addMSGroupInfoCaches(MSGroupInfoCache[] infoCachesArg)
Adds the GroupInformation to the list of groups to be configured.
Parameters:
infoCachesArg[] - Array of group information.

dispose

public void dispose()
Method to stop the ManagementClient.

setUpManagementClient

protected void setUpManagementClient()
Sets up the ManagementClient for communicating with the ManagementServer.

setDebug

public void setDebug(boolean bool)
Sets the debug value.
Parameters:
bool - Set true, if debug is needed.

getDebug

public boolean getDebug()
Returns debug value.
Returns:
'boolean'

debug

protected void debug(java.lang.Object messageArg)

getDebugName

public java.lang.String getDebugName()
Returns the debug name that is set.
Returns:
'String'

setDebugName

public void setDebugName(java.lang.String name)
Sets the debug name to be displayed.
Parameters:
name - Name to be displayed while the debug message is shown.

startConfiguration

public abstract void startConfiguration()
                                 throws java.lang.Exception

processException

public abstract void processException(com.adventnet.management.Property p,
                                      java.lang.Exception exp)
Specified by:
processException in interface com.adventnet.management.ExceptionListener

WebNMS 5 API Specification