Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mandarax.eca.example
Class PortfolioAction  view PortfolioAction download PortfolioAction.java

java.lang.Object
  extended byorg.mandarax.eca.example.PortfolioAction
All Implemented Interfaces:
org.mandarax.eca.Action, org.mandarax.eca.ECALog

public class PortfolioAction
extends java.lang.Object
implements org.mandarax.eca.Action

An action that can be performed by a portfolio agent.


Field Summary
private  int actionType
           
static int ALERT
           
static int ALERT_URGENT
           
static int BUY
           
static int LOG
           
private  java.lang.String message
           
static int NOTHING
           
static int SELL
           
private  java.lang.Object target
           
 
Fields inherited from interface org.mandarax.eca.ECALog
LOG_ECA
 
Constructor Summary
PortfolioAction()
          Constructor.
PortfolioAction(int actionType)
          Constructor.
 
Method Summary
private static void alert(Investment inv, Derivation der, boolean urgent)
          Send an alert.
 int getActionType()
          Returns the actionType.
 java.lang.String getMessage()
          Returns the message.
 java.lang.Object getTarget()
          Returns the target.
private static void mail(java.lang.String subject, java.lang.String text, boolean highPriority)
          Send an email.
 void perform(java.lang.Object[] param)
          Perform an action.
private static void print(DerivationNode node, java.lang.StringBuffer buf)
          Print a derivation root.
 void setActionType(int actionType)
          Sets the actionType.
 void setMessage(java.lang.String message)
          Sets the message.
 void setTarget(java.lang.Object target)
          Sets the target.
 java.lang.String toString()
          Convert the action to a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALERT

public static final int ALERT
See Also:
Constant Field Values

ALERT_URGENT

public static final int ALERT_URGENT
See Also:
Constant Field Values

SELL

public static final int SELL
See Also:
Constant Field Values

BUY

public static final int BUY
See Also:
Constant Field Values

LOG

public static final int LOG
See Also:
Constant Field Values

NOTHING

public static final int NOTHING
See Also:
Constant Field Values

message

private java.lang.String message

target

private java.lang.Object target

actionType

private int actionType
Constructor Detail

PortfolioAction

public PortfolioAction()
Constructor.


PortfolioAction

public PortfolioAction(int actionType)
Constructor. Pass the action type.

Method Detail

getMessage

public java.lang.String getMessage()
Returns the message.


setMessage

public void setMessage(java.lang.String message)
Sets the message.


getTarget

public java.lang.Object getTarget()
Returns the target.

Specified by:
getTarget in interface org.mandarax.eca.Action

setTarget

public void setTarget(java.lang.Object target)
Sets the target.

Specified by:
setTarget in interface org.mandarax.eca.Action

perform

public void perform(java.lang.Object[] param)
             throws org.mandarax.eca.ActionException
Perform an action.

Specified by:
perform in interface org.mandarax.eca.Action

toString

public java.lang.String toString()
Convert the action to a string.


mail

private static void mail(java.lang.String subject,
                         java.lang.String text,
                         boolean highPriority)
                  throws java.lang.Exception
Send an email.


alert

private static void alert(Investment inv,
                          Derivation der,
                          boolean urgent)
Send an alert.


print

private static void print(DerivationNode node,
                          java.lang.StringBuffer buf)
Print a derivation root.


getActionType

public int getActionType()
Returns the actionType.


setActionType

public void setActionType(int actionType)
Sets the actionType.