WebNMS 5 API Specification

com.adventnet.beans.chassis
Interface ChassisComponent

All Known Subinterfaces:
ChassisCard, ChassisShelf

public interface ChassisComponent

The class, that is interested in registering itself or to be identified as one of the components in the Chassis has to implement this interface.


Field Summary
static int POSTADD
           
static int PREADD
           
 
Method Summary
 java.lang.Object componentAdded(java.lang.Object componentArg, int typeArg)
          Called by the Chassis Application in run time whenever a Card or a Shelf is getting added to the Slot or the Shelf Component respectively.
 boolean componentRemoved(java.lang.Object componentArg)
          Called by the Chassis Application in runtime, whenever a Card or a Shelf is removed from the Slot or the Shelf Component respectively.
 void disposeOf()
          Invoked when an existing component is replaced by a new one, in a holder panel.
 ChassisPlaceHolder[] getChildren()
          Returns the child holder panels that are present in the implementing class.
 java.lang.String getInstanceName()
          Returns the instance name of the implementing class.
 java.awt.Insets getPadding()
          Returns the padding or insets around the sides that have to be given, when this component is placed on a holder panel.
 void setChassisProperty(java.lang.String propertyName, java.lang.String propertyValue)
          Invoked by the Chassis Application, while the application wants to pass the index incase of Device or other Properties in case of the Chassis, being constructed from the WebNms database.
 void start()
          Invoked when the implenting class is identified as a ChassisComponent and placed on any of the holder panels.
 void stop()
          Stops all the processes, when invoked.
 

Field Detail

PREADD

public static final int PREADD

POSTADD

public static final int POSTADD
Method Detail

start

public void start()
Invoked when the implenting class is identified as a ChassisComponent and placed on any of the holder panels. The start method is called from the Chassis Application.

stop

public void stop()
Stops all the processes, when invoked. Normally invoked by the Chassis Application while stopping all the processes.

disposeOf

public void disposeOf()
Invoked when an existing component is replaced by a new one, in a holder panel.

getPadding

public java.awt.Insets getPadding()
Returns the padding or insets around the sides that have to be given, when this component is placed on a holder panel.
Returns:
Insets - Padding values for the component

getChildren

public ChassisPlaceHolder[] getChildren()
Returns the child holder panels that are present in the implementing class.
Returns:
ChassisPlaceHolder[] - Array of the child holder panels

getInstanceName

public java.lang.String getInstanceName()
Returns the instance name of the implementing class.
Returns:
String - Instance name of the class

setChassisProperty

public void setChassisProperty(java.lang.String propertyName,
                               java.lang.String propertyValue)
Invoked by the Chassis Application, while the application wants to pass the index incase of Device or other Properties in case of the Chassis, being constructed from the WebNms database.
Parameters:
propertyName - Name of the property to be set.
propertyValue - Value of the corressponding property.

componentAdded

public java.lang.Object componentAdded(java.lang.Object componentArg,
                                       int typeArg)
Called by the Chassis Application in run time whenever a Card or a Shelf is getting added to the Slot or the Shelf Component respectively. This method is called twice, one before adding the component and after the component is added.
Parameters:
componentArg - Component to be added.
typeArg - PREADD for Before adding , POSTADD for After adding.
Returns:
Object - Added component

componentRemoved

public boolean componentRemoved(java.lang.Object componentArg)
Called by the Chassis Application in runtime, whenever a Card or a Shelf is removed from the Slot or the Shelf Component respectively. Being called before removing a component and enables any validation before removing and retrun the boolean accordingly.
Parameters:
componentArg - Component to be removed.
Returns:
boolean - Status of component removal.

WebNMS 5 API Specification