org.sandev.basics.MessageDriver
Class MessageDriverNodeCtrl

java.lang.Object
  extended by org.sandev.basics.MessageDriver.MessageDriverNodeCtrl
All Implemented Interfaces:
MessageDriverNodeCtrlMBean, ControlWrapper

public class MessageDriverNodeCtrl
extends java.lang.Object
implements MessageDriverNodeCtrlMBean, ControlWrapper

AUTOGENERATED FILE, DO NOT EDIT DIRECTLY.
source: org.sandev.basics.MessageDriver.MessageDriverNodeDecl
generator: org.sandev.generator.NodeStdMBeanGenerator
time: Jun 15, 2007 11:40:44 PM


Field Summary
protected  MessageDriverNode node
          Aggregated node class instance
 
Constructor Summary
MessageDriverNodeCtrl()
          Default ctor initializes a new node instance.
MessageDriverNodeCtrl(Controllable node)
          Controllable constructor.
MessageDriverNodeCtrl(MessageDriverNode node)
          Node constructor.
 
Method Summary
 Controllable getControllable()
          Wraps getNode
 java.lang.String getInstClassEnumName()
          accessor for instClassEnumName
 int getLogLevel()
          accessor for logLevel
 java.lang.String getLogLevelEnumSummary()
          enum value summary for logLevel
 int getMaxTestWaitSeconds()
          accessor for maxTestWaitSeconds
 MessageDriverNode getNode()
          Initializing accessor for our local node instance.
 java.lang.String getNodeInstanceName()
          accessor for nodeInstanceName
 int getPollingIntervalSeconds()
          accessor for pollingIntervalSeconds
 java.lang.String getSandNodeErrorMessage()
          accessor for sandNodeErrorMessage
 int getSandNodeState()
          accessor for sandNodeState
 java.lang.String getSandNodeStateEnumSummary()
          enum value summary for sandNodeState
 java.lang.String getServername()
          accessor for servername
 java.util.Date getStartupTime()
          accessor for startupTime
 java.lang.String getTestScriptFilename()
          accessor for testScriptFilename
 java.lang.String getUniqueIDMgrName()
          accessor for uniqueIDMgrName
 void info(java.lang.String text)
          Utility to log an informational message.
 void paramChanged(java.lang.String paramName)
          Our current MBean UIs are web browser pages that read the parameters each time the page is generated, so we don't currently react to parameter changes.
 void sandInitialize()
          Register and create this MBean
 void setControllable(Controllable node)
          Passthrough to setNode
 void setInstClassEnumName(java.lang.String val)
          mutator for instClassEnumName
 void setLogLevel(int val)
          mutator for logLevel
 void setMaxTestWaitSeconds(int val)
          mutator for maxTestWaitSeconds
 void setNode(MessageDriverNode node)
          set the aggregated node instance.
 void setPollingIntervalSeconds(int val)
          mutator for pollingIntervalSeconds
 void setSandNodeErrorMessage(java.lang.String val)
          mutator for sandNodeErrorMessage
 void setSandNodeState(int val)
          mutator for sandNodeState
 void setStartupTime(java.util.Date val)
          mutator for startupTime
 void setTestScriptFilename(java.lang.String val)
          mutator for testScriptFilename
 void setUniqueIDMgrName(java.lang.String val)
          mutator for uniqueIDMgrName
 void startService()
          Call the node startup processing when the service starts.
 void stateChanged(int prevState, int currState)
          React to a state change.
 void stopService()
          Call the node shutdown processing when the service stops.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected MessageDriverNode node
Aggregated node class instance

Constructor Detail

MessageDriverNodeCtrl

public MessageDriverNodeCtrl()
Default ctor initializes a new node instance. Do not use this to set up control for an existing node.


MessageDriverNodeCtrl

public MessageDriverNodeCtrl(MessageDriverNode node)
Node constructor. Sets our node reference to the given node instance


MessageDriverNodeCtrl

public MessageDriverNodeCtrl(Controllable node)
Controllable constructor. Sets our node reference by casting the given Controllable reference to a MessageDriverNode

Method Detail

getNode

public MessageDriverNode getNode()
Initializing accessor for our local node instance. If no instance was defined on creation, then this method creates a new instance to return.


setNode

public void setNode(MessageDriverNode node)
set the aggregated node instance. This should generally be done at construction time.


info

public void info(java.lang.String text)
Utility to log an informational message. This calls through to our node log method if we have a node reference, otherwise it just calls System.out.println with the given text. This method does not call getNode(), so it is safe to use it during ctor and initialization processing.


stateChanged

public void stateChanged(int prevState,
                         int currState)
React to a state change. The state change may have come from this bean, or it may have come from another control interface. The node has embedded state change logic which protects against invalid or redundent state transitions, so we don't need to worry about protecting the calls here.

There are more state changes in SAND then there are in the ServiceMBean, so we only pick up on some of the more major state changes here, like running or stopped. Here's how the other ServiceMBean state transitions are handled:

Specified by:
stateChanged in interface ControlWrapper

paramChanged

public void paramChanged(java.lang.String paramName)
Our current MBean UIs are web browser pages that read the parameters each time the page is generated, so we don't currently react to parameter changes.

Specified by:
paramChanged in interface ControlWrapper

setControllable

public void setControllable(Controllable node)
Passthrough to setNode

Specified by:
setControllable in interface ControlWrapper

getControllable

public Controllable getControllable()
Wraps getNode

Specified by:
getControllable in interface ControlWrapper

sandInitialize

public void sandInitialize()
                    throws ControlWrapperException
Register and create this MBean

Specified by:
sandInitialize in interface ControlWrapper
Throws:
ControlWrapperException

startService

public void startService()
                  throws java.lang.Exception
Call the node startup processing when the service starts. This is public to allow for reflective access from an external control adaptor.

Throws:
java.lang.Exception

stopService

public void stopService()
                 throws java.lang.Exception
Call the node shutdown processing when the service stops. This is public to allow for reflective access from an external control adaptor.

Throws:
java.lang.Exception

getTestScriptFilename

public java.lang.String getTestScriptFilename()
accessor for testScriptFilename

Specified by:
getTestScriptFilename in interface MessageDriverNodeCtrlMBean

setTestScriptFilename

public void setTestScriptFilename(java.lang.String val)
mutator for testScriptFilename

Specified by:
setTestScriptFilename in interface MessageDriverNodeCtrlMBean

getInstClassEnumName

public java.lang.String getInstClassEnumName()
accessor for instClassEnumName

Specified by:
getInstClassEnumName in interface MessageDriverNodeCtrlMBean

setInstClassEnumName

public void setInstClassEnumName(java.lang.String val)
mutator for instClassEnumName

Specified by:
setInstClassEnumName in interface MessageDriverNodeCtrlMBean

getUniqueIDMgrName

public java.lang.String getUniqueIDMgrName()
accessor for uniqueIDMgrName

Specified by:
getUniqueIDMgrName in interface MessageDriverNodeCtrlMBean

setUniqueIDMgrName

public void setUniqueIDMgrName(java.lang.String val)
mutator for uniqueIDMgrName

Specified by:
setUniqueIDMgrName in interface MessageDriverNodeCtrlMBean

getMaxTestWaitSeconds

public int getMaxTestWaitSeconds()
accessor for maxTestWaitSeconds

Specified by:
getMaxTestWaitSeconds in interface MessageDriverNodeCtrlMBean

setMaxTestWaitSeconds

public void setMaxTestWaitSeconds(int val)
mutator for maxTestWaitSeconds

Specified by:
setMaxTestWaitSeconds in interface MessageDriverNodeCtrlMBean

getPollingIntervalSeconds

public int getPollingIntervalSeconds()
accessor for pollingIntervalSeconds

Specified by:
getPollingIntervalSeconds in interface MessageDriverNodeCtrlMBean

setPollingIntervalSeconds

public void setPollingIntervalSeconds(int val)
mutator for pollingIntervalSeconds

Specified by:
setPollingIntervalSeconds in interface MessageDriverNodeCtrlMBean

getStartupTime

public java.util.Date getStartupTime()
accessor for startupTime

Specified by:
getStartupTime in interface MessageDriverNodeCtrlMBean

setStartupTime

public void setStartupTime(java.util.Date val)
mutator for startupTime

Specified by:
setStartupTime in interface MessageDriverNodeCtrlMBean

getNodeInstanceName

public java.lang.String getNodeInstanceName()
accessor for nodeInstanceName

Specified by:
getNodeInstanceName in interface MessageDriverNodeCtrlMBean

getServername

public java.lang.String getServername()
accessor for servername

Specified by:
getServername in interface MessageDriverNodeCtrlMBean

getSandNodeState

public int getSandNodeState()
accessor for sandNodeState

Specified by:
getSandNodeState in interface MessageDriverNodeCtrlMBean

getSandNodeStateEnumSummary

public java.lang.String getSandNodeStateEnumSummary()
enum value summary for sandNodeState

Specified by:
getSandNodeStateEnumSummary in interface MessageDriverNodeCtrlMBean

setSandNodeState

public void setSandNodeState(int val)
mutator for sandNodeState

Specified by:
setSandNodeState in interface MessageDriverNodeCtrlMBean

getSandNodeErrorMessage

public java.lang.String getSandNodeErrorMessage()
accessor for sandNodeErrorMessage

Specified by:
getSandNodeErrorMessage in interface MessageDriverNodeCtrlMBean

setSandNodeErrorMessage

public void setSandNodeErrorMessage(java.lang.String val)
mutator for sandNodeErrorMessage

Specified by:
setSandNodeErrorMessage in interface MessageDriverNodeCtrlMBean

getLogLevel

public int getLogLevel()
accessor for logLevel

Specified by:
getLogLevel in interface MessageDriverNodeCtrlMBean

getLogLevelEnumSummary

public java.lang.String getLogLevelEnumSummary()
enum value summary for logLevel

Specified by:
getLogLevelEnumSummary in interface MessageDriverNodeCtrlMBean

setLogLevel

public void setLogLevel(int val)
mutator for logLevel

Specified by:
setLogLevel in interface MessageDriverNodeCtrlMBean