WebNMS 5 API Specification

com.adventnet.beans.chassis
Class BaseHelper

java.lang.Object
  |
  +--com.adventnet.beans.chassis.BaseHelper
Direct Known Subclasses:
ChassisHelper, ShelfHelper

public class BaseHelper
extends java.lang.Object

BaseHelper is an object that provides the underlying framework for running the chassis during the runtime. This class controls the starting and stopping of the base objects, i.e. the ChassisComponent.

See Also:
ChassisHelper, ChassisPoller, ShelfHelper, ShelfPositioner

Field Summary
protected  java.applet.Applet applet
           
static boolean debug
           
protected static java.lang.String[] DUMMY_ARRAY
           
protected  ChassisPlaceHolder[] holders
           
protected  ChassisComponent parentComponent
           
 
Constructor Summary
BaseHelper(java.applet.Applet applet, java.lang.String instanceNameArg)
          Applet Constructor to instantiate the BaseHelper class with the instanceName or identifer String as another argument.
BaseHelper(java.lang.String instanceNameArg)
          Default constructor for the BaseHelper, which takes in the InstanceName or identifier String as argument.
 
Method Summary
 void debug(java.lang.String messageArg)
          Prints the message out, given as argument, to the console.
 ChassisComponent getChassisComponent()
          This method returns the already set ChassisComponent instance.
 java.lang.Object getInstance(java.lang.String classNameArg)
          Used to create a new instance of the class, specified by the string argument passed.
 ChassisPlaceHolder[] getPlaceHolders()
          Returns an array of holder panels (ChassisPlaceHolder) already set on this Object.
 void reinitialize()
          Used to reinitialize the Chassis as and when required.
 void setApplet(java.applet.Applet appletArg)
          used to set the applet instance on the BaseHelper class.
 void setChassisComponent(ChassisComponent chassisCompArg)
          The parent Chassis should be an instance of ChassisComponent and this should be set using this API, before proceeding with other APIs of this object.
static void setDebug(boolean debugArg)
          Enables the debug messages to be printed out to the console.
 void setInstanceName(java.lang.String instanceNameArg)
          This method is used when the debug is enabled.
 void setPlaceHolders(ChassisPlaceHolder[] holdersArg)
          Takes an array of ChassisPlaceHolders as argument.
 void start()
          Used to start all the processes inside the Chassis.
 void stop()
          Used to stop all the processes inside the Chassis.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DUMMY_ARRAY

protected static final java.lang.String[] DUMMY_ARRAY

debug

public static boolean debug

applet

protected java.applet.Applet applet

holders

protected ChassisPlaceHolder[] holders

parentComponent

protected ChassisComponent parentComponent
Constructor Detail

BaseHelper

public BaseHelper(java.lang.String instanceNameArg)
Default constructor for the BaseHelper, which takes in the InstanceName or identifier String as argument.
Parameters:
instanceNameArg -  

BaseHelper

public BaseHelper(java.applet.Applet applet,
                  java.lang.String instanceNameArg)
Applet Constructor to instantiate the BaseHelper class with the instanceName or identifer String as another argument.
Parameters:
applet -  
instanceNameArg -  
See Also:
setInstanceName
Method Detail

setInstanceName

public void setInstanceName(java.lang.String instanceNameArg)
This method is used when the debug is enabled. If you have more than one instance of the BaseHelper class, the instanceName is useful in identifying from where the debug message is printed.
Parameters:
instanceNameArg -  

setApplet

public void setApplet(java.applet.Applet appletArg)
used to set the applet instance on the BaseHelper class. It is also used when the applet instance is changed and when the user needs to maintain the same instance of the BaseHelper class.
Parameters:
appletArg -  

setPlaceHolders

public void setPlaceHolders(ChassisPlaceHolder[] holdersArg)
Takes an array of ChassisPlaceHolders as argument. This holders are considered to be the holderpanels, i.e. either ShelfComponent or SlotComponent.
Parameters:
holdersArg -  

getPlaceHolders

public ChassisPlaceHolder[] getPlaceHolders()
Returns an array of holder panels (ChassisPlaceHolder) already set on this Object.
Returns:
'ChassisPlaceHolder[]'

setChassisComponent

public void setChassisComponent(ChassisComponent chassisCompArg)
The parent Chassis should be an instance of ChassisComponent and this should be set using this API, before proceeding with other APIs of this object.
See Also:
ChassisComponent

getChassisComponent

public ChassisComponent getChassisComponent()
This method returns the already set ChassisComponent instance. If it is not already set, null value is returned.
Returns:
ChassisComponent

start

public void start()
Used to start all the processes inside the Chassis. The start method in turn recursively calls the start method of all the ChassisComponent under the parent ChassisComponent.

stop

public void stop()
Used to stop all the processes inside the Chassis. The stop method in turn recursively calls the stop method of all the ChassisComponent under the parent ChassisComponent.

getInstance

public java.lang.Object getInstance(java.lang.String classNameArg)
Used to create a new instance of the class, specified by the string argument passed. Throws an Exception, if it fails to create an instance of the Class, specified by the String.
Parameters:
classNameArg -  

reinitialize

public void reinitialize()
Used to reinitialize the Chassis as and when required.

debug

public void debug(java.lang.String messageArg)
Prints the message out, given as argument, to the console. Message is displayed only if the debug is set to true using setDebug method.
Parameters:
messageArg -  

setDebug

public static void setDebug(boolean debugArg)
Enables the debug messages to be printed out to the console.
Parameters:
debugArg -  

WebNMS 5 API Specification