|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectceleboss.plugin.AbstractRobotTrader
This class provides a skeleton for any automated trader to be constructed on top of. The class provides a top-level window with buttons to control the robots progress. There is also a means to log messages and display the status of the robot. It contains a log area where messages concerning the progress can be recorded.
| Field Summary | |
static int |
ERROR
Value of the Error status |
static int |
RUNNING
Value of the Running status |
static int |
STARTING
Value of the Starting status |
static int |
STOPPED
Value of the Stopped status |
static int |
STOPPING
Value of the Stopping status |
static int |
WAITING
Value of the Waiting status |
| Constructor Summary | |
protected |
AbstractRobotTrader(java.lang.String newName)
Create the basic window framework for the robot to be hosted. |
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent arg0)
An action has been performed in one of the child components. |
void |
logMessage(java.lang.String message)
Log a new message to the log area. |
void |
setContext(Portfolio portfolio)
Set the context in which this Bot is suppose to work. |
protected void |
setContextPane(javax.swing.JPanel contentPane)
A context pane for the specific sub-class robot is specified. |
void |
setStatus(int state,
java.lang.String message)
Update the status of this robot. |
protected void |
setTimePrefix(boolean newPrefix)
This method defines whether the logged messages should be prefixed with a date and time of their entry. |
void |
shutdown()
This method shoudl be overridden by any sub-classes. |
abstract boolean |
start()
The robot is to start processing. |
abstract void |
stop()
The robot is to stop processing immediately. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int ERROR
public static final int RUNNING
public static final int STARTING
public static final int STOPPED
public static final int STOPPING
public static final int WAITING
| Constructor Detail |
protected AbstractRobotTrader(java.lang.String newName)
newName - Name of robot.| Method Detail |
public void actionPerformed(java.awt.event.ActionEvent arg0)
actionPerformed in interface java.awt.event.ActionListenerarg0 - Description of event.public final void logMessage(java.lang.String message)
message - New message to log.public void setContext(Portfolio portfolio)
setContext in interface PortfolioPluginportfolio - The portfolio to be tradedprotected final void setContextPane(javax.swing.JPanel contentPane)
contentPane - Panel containing robot specific content.
public final void setStatus(int state,
java.lang.String message)
state - State must be between WAITING and ERROR.message - Optional extra message.protected void setTimePrefix(boolean newPrefix)
newPrefix - New prefix setting.logMessage(String)public void shutdown()
shutdown in interface PortfolioPluginpublic abstract boolean start()
public abstract void stop()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||