org.ow2.jasmine.monitoring.mbeancmd
Class CmdThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.ow2.jasmine.monitoring.mbeancmd.CmdThread
All Implemented Interfaces:
Runnable

public class CmdThread
extends Thread

Extend Thread class in order to implement command status control and execution delay. Status control is used when command control is made by the EventSwitchManager MBean. Execution delay is currently used by the MBeanCmdWrapper that is is used by Mule.

Author:
Adriana Danes

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  String cmdStatus
           
protected  String[] commandArgs
           
protected  long delay
          delay to start used by the MBeanCmdWrapper
protected  String error
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
CmdThread(String[] args, long delay)
          Create a thread in order to execute a command.
 
Method Summary
 String getCmdStatus()
           
 String getErrorMessage()
           
 void run()
           
 void setCmdStatus(String cmdStatus)
          Status set by the command dispatcher.
 void setErrorMessage(String mess)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

commandArgs

protected String[] commandArgs

cmdStatus

protected String cmdStatus

delay

protected long delay
delay to start used by the MBeanCmdWrapper


error

protected String error
Constructor Detail

CmdThread

public CmdThread(String[] args,
                 long delay)
Create a thread in order to execute a command.

Parameters:
args - the command's arguments.
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

getCmdStatus

public String getCmdStatus()
Returns:

setCmdStatus

public void setCmdStatus(String cmdStatus)
Status set by the command dispatcher.

Parameters:
cmdStatus - new status

getErrorMessage

public String getErrorMessage()

setErrorMessage

public void setErrorMessage(String mess)


Copyright © 2012 OW2 Consortium. All Rights Reserved.