com.bluemarsh.jswat.breakpoint
Class CommandMonitor
java.lang.Object
|
+--com.bluemarsh.jswat.breakpoint.CommandMonitor
- All Implemented Interfaces:
- Monitor, java.io.Serializable
- public class CommandMonitor
- extends java.lang.Object
- implements Monitor
Class CommandMonitor executes a given command when invoked.
- Author:
- Nathan Fiedler
- See Also:
- Serialized Form
Field Summary |
protected java.lang.String |
commandToRun
The command to be run. |
Constructor Summary |
CommandMonitor(java.lang.String cmd)
Constructs a CommandMonitor that runs the given command
each time this monitor is executed. |
Method Summary |
java.lang.String |
getCommand()
Returns the command that is run by this monitor. |
MonitorUI |
getUIAdapter()
Returns the user interface widget for customizing this monitor. |
void |
perform(Session session)
Perform the action that this monitor is defined to do. |
java.lang.String |
toString()
Returns a string representation of this. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
commandToRun
protected java.lang.String commandToRun
- The command to be run.
CommandMonitor
public CommandMonitor(java.lang.String cmd)
- Constructs a CommandMonitor that runs the given command
each time this monitor is executed.
- Parameters:
cmd
- command to run.
getCommand
public java.lang.String getCommand()
- Returns the command that is run by this monitor.
- Returns:
- Command string.
getUIAdapter
public MonitorUI getUIAdapter()
- Returns the user interface widget for customizing this monitor.
- Specified by:
getUIAdapter
in interface Monitor
- Returns:
- Monitor user interface adapter.
perform
public void perform(Session session)
- Perform the action that this monitor is defined to do.
- Specified by:
perform
in interface Monitor
- Parameters:
session
- Session in which to operate.
toString
public java.lang.String toString()
- Returns a string representation of this.
- Overrides:
toString
in class java.lang.Object
- Returns:
- String representing this.