org.marketcetera.strategy.RunningStrategy Maven / Gradle / Ivy
package org.marketcetera.strategy;
import org.marketcetera.client.BrokerStatusListener;
import org.marketcetera.client.brokers.BrokerStatus;
import org.marketcetera.core.ClassVersion;
import org.marketcetera.event.AskEvent;
import org.marketcetera.event.BidEvent;
import org.marketcetera.event.DividendEvent;
import org.marketcetera.event.MarketstatEvent;
import org.marketcetera.event.TradeEvent;
import org.marketcetera.trade.ExecutionReport;
import org.marketcetera.trade.OrderCancelReject;
/* $License$ */
/**
* An interface to a running strategy that facilitates communication to the strategy.
*
* @author Colin DuPlantis
* @version $Id: RunningStrategy.java 16600 2013-06-26 00:53:16Z colin $
* @since 1.0.0
*/
@ClassVersion("$Id: RunningStrategy.java 16600 2013-06-26 00:53:16Z colin $")
public interface RunningStrategy extends BrokerStatusListener
{
/**
* Indicates a TradeEvent
has been received.
*
* @param inTrade a TradeEvent
value
*/
public void onTrade(TradeEvent inTrade);
/**
* Indicates a BidEvent
has been received.
*
* @param inBid a BidEvent
value
*/
public void onBid(BidEvent inBid);
/**
* Indicates an AskEvent
has been received.
*
* @param inAsk an AskEvent
value
*/
public void onAsk(AskEvent inAsk);
/**
* Indicates a MarketstatEvent
has been received.
*
* @param inStatistics a MarketstatEvent
value
*/
public void onMarketstat(MarketstatEvent inStatistics);
/**
* Indicates a DividendEvent
has been received.
*
* @param inDividend a DividendEvent
value
*/
public void onDividend(DividendEvent inDividend);
/**
* Indicates an ExecutionReport
has been received.
*
* @param inExecutionReport an ExecutionReport
value
*/
public void onExecutionReport(ExecutionReport inExecutionReport);
/**
* Indicates an OrderCancelReject
has been received.
*
* @param inCancelReject an OrderCancelReject
value
*/
public void onCancelReject(OrderCancelReject inCancelReject);
/**
* Indicates a BrokerStatus
has been received.
*
* @param inStatus a BrokerStatus
value
*/
public void onReceiveBrokerStatus(BrokerStatus inStatus);
/**
* Indicates an object has been sent that does not fit any of the other callbacks.
*
* @param inEvent an Object
value
*/
public void onOther(Object inEvent);
/**
* Indicates a scheduled callback has been executed.
*
* @param inData an Object
value passed to the request for callback method
*/
public void onCallback(Object inData);
/**
* Called when a strategy is started.
*/
public void onStart();
/**
* Called when a strategy is about to be stopped.
*/
public void onStop();
}