AdventNet Web NMS 4 API Specification

com.adventnet.management.config
Class ConfigTaskEvent

java.lang.Object
  |
  +--com.adventnet.management.config.ConfigTaskEvent
All Implemented Interfaces:
java.io.Serializable

public class ConfigTaskEvent
extends java.lang.Object
implements java.io.Serializable

This event indicates that a device associated with a ConfigTask has been configured for Task execution or for applying the rollback. Registered Listeners will be notified with this event for each device associated with the ConfigTask. Listeners can be registered with the ConfigServer through DeviceConfigurationAPI.

Since:
2.2
See Also:
DeviceConfigurationAPI.registerTaskListener(String, ConfigTaskListener), Serialized Form

Constructor Summary
ConfigTaskEvent(java.lang.String taskName, java.lang.String subTaskName, java.lang.String deviceName, java.lang.String status, int retriesCompleted, int totalRetries)
          Constructs a ConfigTaskEvent with taskname, devicename, status ,retry completed and totalRetries
 
Method Summary
 java.lang.String getDeviceName()
          Returns the name of the configured device.
 int getRetryCompleted()
          Returns the number of retries attempted for the device.
 java.lang.String getRollback()
          Returns whether rollback has been attempted or ignored for the device.
 java.lang.String getRollbackStatus()
          Returns the rollback status for this device.If getRollback() is ConfigConstants.ATTEMPTED then it returns the rollback status, otherwise null.
 java.lang.String getStatus()
          Returns the status of configuration of the device.
 java.lang.String getSubTaskName()
          Returns the name of the subtask in a CombinedTask.
 java.lang.String getTaskName()
          Returns the name of the executed task.
 int getTotalRetries()
          Returns the total number of retries to be attempted for configuring the device.
 java.lang.String toString()
          Returns the concatenated string of taskname, devicename, status, retries completed and total retries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigTaskEvent

public ConfigTaskEvent(java.lang.String taskName,
                       java.lang.String subTaskName,
                       java.lang.String deviceName,
                       java.lang.String status,
                       int retriesCompleted,
                       int totalRetries)
Constructs a ConfigTaskEvent with taskname, devicename, status ,retry completed and totalRetries
Parameters:
taskName - name of the task executed for this device.
subTaskName - name of the subTask defined in a CombinedTask.
deviceName - name of the configured device.
status - the status of configuration of a device. It can be either of the following - ConfigConstants.FINISHED, ConfigConstants.FAILED or ConfigConstants.IGNORED
retriesCompleted - number of retries attempted for configuring the device.
totalRetries - total number of retries assigned for the device
Method Detail

getRollbackStatus

public java.lang.String getRollbackStatus()
Returns the rollback status for this device.If getRollback() is ConfigConstants.ATTEMPTED then it returns the rollback status, otherwise null.
Returns:
Success or ConfigConstants.FAILED
See Also:
getRollback(), getStatus(), ConfigConstants

getRollback

public java.lang.String getRollback()
Returns whether rollback has been attempted or ignored for the device.

If rollback option in the task is disabled or getStatus() returns ConfigConstants.IGNORED, it returns null.

If rollback option is enabled , it returns either ConfigConstants.IGNORED or ConfigConstants.ATTEMPTED .

Returns:
either ConfigConstants.ATTEMPTED or ConfigConstants.IGNORED if rollback is enabled, null if rollback is disabled or if the device is not scheduled for configuration.
See Also:
getRollbackStatus(), getStatus(), ConfigConstants

getTaskName

public java.lang.String getTaskName()
Returns the name of the executed task.
Returns:
the taskName as a String.

getSubTaskName

public java.lang.String getSubTaskName()
Returns the name of the subtask in a CombinedTask.
Returns:
subTaskName if the executed task is a CombinedTask, otherwise null.

getDeviceName

public java.lang.String getDeviceName()
Returns the name of the configured device.
Returns:
deviceName

getStatus

public java.lang.String getStatus()
Returns the status of configuration of the device. It can be either ConfigConstants.FINISHED or ConfigConstants. FAILED or ConfigConstants.IGNORED.

Status FINISHED indicates that the device is successfully configured.

Status IGNORED indicates that the device is not scheduled for configuration as any one of the devices gets failed and rollback option is enabled for the executed task.

Returns:
status of the device which can be FINISHED or FAILED or IGNORED.
See Also:
ConfigConstants

getRetryCompleted

public int getRetryCompleted()
Returns the number of retries attempted for the device.
Returns:
the number of retries completed.

getTotalRetries

public int getTotalRetries()
Returns the total number of retries to be attempted for configuring the device.
Returns:
an integer value representing the total number of retries that has been set for the device.

toString

public java.lang.String toString()
Returns the concatenated string of taskname, devicename, status, retries completed and total retries.
Overrides:
toString in class java.lang.Object
Returns:
the String value of the result of configuration in a device.

AdventNet Web NMS 4 API Specification