AdventNet Web NMS 4 API Specification

com.adventnet.nms.fe.config
Interface ThinDeviceConfigAPI

All Superinterfaces:
CommonModuleAPI, java.rmi.Remote

public interface ThinDeviceConfigAPI
extends java.rmi.Remote, CommonModuleAPI

A wrapper over DeviceConfigAPI which has no dependencies over other classes. The methods in this API is used for DeviceConfigAPI method call fom ConfigSessionBean

Since:
WebNms 2.3

Method Summary
 void createTask(java.lang.String userName, java.lang.String taskXML)
          Method to create a new task.
 void executeTask(java.lang.String userName, java.lang.String taskXML)
          Method to start Configuration for the given Task.XMLGenerator class can be used to generate xml file.This task file contains the device information.
 java.lang.String getDeviceConfiguration(java.lang.String userName, java.lang.String taskXML)
          To get the current configuration of a device.
 java.util.Vector getDevices(java.lang.String userName, java.lang.String taskName)
          Returns all the devices that are in the given task.
 java.util.Vector getPendingDevices(java.lang.String userName, java.lang.String taskName)
          Returns Vector of pendingdevices associated to that task.
 java.util.Vector getPendingTasks(java.lang.String userName)
          Returns a Vector of pending task names that needs to be executed over pending devices.
 java.lang.String getStatus(java.lang.String userName, java.lang.String taskName)
          This method returns status of the task.
 java.lang.String getStatus(java.lang.String userName, java.lang.String taskName, java.lang.String device)
          This method returns the status of a specific device.
 java.lang.String getTask(java.lang.String userName, java.lang.String taskName)
          Returns the task if the given task exists.
 void removeTask(java.lang.String userName, java.lang.String taskName)
          Removes the existing task and its associated device entries from the pending list and deletes the xml for that task.
 void retainSession(java.lang.String userName)
          To retain the Session established between ConfigServer and the devices .
 void terminateSession(java.lang.String userName)
          To terminate the Session established between ConfigServer and the set of devices for a particular user.
 

Method Detail

createTask

public void createTask(java.lang.String userName,
                       java.lang.String taskXML)
                throws ConfigException,
                       TaskExistsException,
                       java.rmi.RemoteException
Method to create a new task. XMLGenerator class can be used to generate xml file.This task file contains the attributes information.
Parameters:
taskXML - task in XML.
Throws:
ConfigException - if task is not successfully created.
TaskExistsException - if task already exists.
java.rmi.RemoteException - :Exception during the execution of a remote method call

executeTask

public void executeTask(java.lang.String userName,
                        java.lang.String taskXML)
                 throws TaskExistsException,
                        TaskNotFoundException,
                        ConfigException,
                        InvalidTaskException,
                        java.rmi.RemoteException
Method to start Configuration for the given Task.XMLGenerator class can be used to generate xml file.This task file contains the device information.
Method attributeSetStatus(AttributeEvent ae) is called for each identfier(for each retry), deviceTaskStatus(ConfigTaskEvent cts) is called for each device (on completing the total retry for that device) and taskStatus(ConfigTaskOverEvent ctoe) is called, on the completion of the Task.
Parameters:
taskXML - task in XML.
Throws:
TaskNotFoundException - if task does not exist.
ConfigException - if it fails to retrieve the task.
InvalidTaskException - if the task is a CombinedConfigTask.
java.rmi.RemoteException - :Exception during the execution of a remote method call

getTask

public java.lang.String getTask(java.lang.String userName,
                                java.lang.String taskName)
                         throws TaskNotFoundException,
                                java.rmi.RemoteException,
                                ConfigException
Returns the task if the given task exists. ConfigTask object can be created from this taskXML, by using one of its constructor.
Returns:
task in XML format.
Throws:
TaskNotFoundException - if task does not exist.
ConfigException - if it fails to retrieve the task.
java.rmi.RemoteException - :Exception during the execution of a remote method call

getStatus

public java.lang.String getStatus(java.lang.String userName,
                                  java.lang.String taskName)
                           throws java.rmi.RemoteException
This method returns status of the task.

OVER
when all the devices of the specified task has the status either Finished or Failed

INPROGRESS
If the Status is InProgress for atleast a device

NOTSTARTED If the status is NotStarted for all the devices.

Parameters:
taskName - String name of the Task.
Throws:
java.rmi.RemoteException - :Exception during the execution of a remote method call
See Also:
ConfigConstants.OVER, ConfigConstants.INPROGRESS, ConfigConstants.NOTSTARTED

getStatus

public java.lang.String getStatus(java.lang.String userName,
                                  java.lang.String taskName,
                                  java.lang.String device)
                           throws java.rmi.RemoteException
This method returns the status of a specific device.
Parameters:
taskName - String name of the Task.
device - String name of the Device. The status can be one of the status constants in ConfigConstants
Returns:
null if there is no such device set for the task
null if the task does not exists
the status of a specific device on a specific task
Throws:
java.rmi.RemoteException - :Exception during the execution of a remote method call
See Also:
ConfigConstants.FINISHED, ConfigConstants.FAILED, ConfigConstants.INPROGRESS, ConfigConstants.NOTSTARTED

getDevices

public java.util.Vector getDevices(java.lang.String userName,
                                   java.lang.String taskName)
                            throws java.rmi.RemoteException
Returns all the devices that are in the given task.
Parameters:
taskName - : String name of the Task.
Returns:
vector containing string of device names or null if taskName does not exist for the user.
Throws:
java.rmi.RemoteException - :Exception during the execution of a remote method call
See Also:
Device

getPendingDevices

public java.util.Vector getPendingDevices(java.lang.String userName,
                                          java.lang.String taskName)
                                   throws java.rmi.RemoteException
Returns Vector of pendingdevices associated to that task.
Parameters:
taskName - : String name of the Task.
Returns:
String of device names.
null if the task does not present for that particular user or no pending devices are present in that task.
Throws:
java.rmi.RemoteException - :Exception during the execution of a remote method call
See Also:
Device

getPendingTasks

public java.util.Vector getPendingTasks(java.lang.String userName)
                                 throws java.rmi.RemoteException
Returns a Vector of pending task names that needs to be executed over pending devices. If no pending tasks are present,return null;
Returns:
Vector of Pending tasks.
Throws:
java.rmi.RemoteException - :Exception during the execution of a remote method call

removeTask

public void removeTask(java.lang.String userName,
                       java.lang.String taskName)
                throws ConfigException,
                       java.rmi.RemoteException
Removes the existing task and its associated device entries from the pending list and deletes the xml for that task.
Parameters:
taskName - String name of the Task to be removed.
Throws:
ConfigException - if it fails to retrieve the task.
java.rmi.RemoteException - :Exception during the execution of a remote method call

getDeviceConfiguration

public java.lang.String getDeviceConfiguration(java.lang.String userName,
                                               java.lang.String taskXML)
                                        throws ConfigException,
                                               TaskNotFoundException,
                                               java.rmi.RemoteException
To get the current configuration of a device.
Parameters:
taskXML - : String task in XML
Returns:
String deviceconfiguration for the given task
Throws:
TaskNotFoundException - if the requested task is not found.
ConfigException - if ConfigServer fails to get the task from the Storage.
java.rmi.RemoteException - :Exception during the execution of a remote method call

retainSession

public void retainSession(java.lang.String userName)
                   throws java.rmi.RemoteException
To retain the Session established between ConfigServer and the devices .
Parameters:
userName - the name of the user for which the session has to be retained

terminateSession

public void terminateSession(java.lang.String userName)
                      throws java.rmi.RemoteException
To terminate the Session established between ConfigServer and the set of devices for a particular user.
Parameters:
userName - the name of the user for which the session has to be terminated.

AdventNet Web NMS 4 API Specification