org.apache.geronimo.samples.daytrader.ejb3
Class TradeSLSBBean
java.lang.Object
org.apache.geronimo.samples.daytrader.ejb3.TradeSLSBBean
- All Implemented Interfaces:
- Remote, TradeServices, TradeSLSBLocal, TradeSLSBRemote
public class TradeSLSBBean
- extends Object
- implements TradeSLSBRemote, TradeSLSBLocal
|
Constructor Summary |
TradeSLSBBean()
Creates a new instance of TradeSLSBBean |
|
Method Summary |
OrderDataBean |
buy(String userID,
String symbol,
double quantity,
int orderProcessingMode)
|
void |
cancelOrder(Integer orderID,
boolean twoPhase)
|
OrderDataBean |
completeOrder(Integer orderID,
boolean twoPhase)
|
QuoteDataBean |
createQuote(String symbol,
String companyName,
BigDecimal price)
|
AccountDataBean |
getAccountData(String userID)
|
AccountProfileDataBean |
getAccountProfileData(String userID)
|
Collection<QuoteDataBean> |
getAllQuotes()
|
Collection<OrderDataBean> |
getClosedOrders(String userID)
|
HoldingDataBean |
getHolding(Integer holdingID)
|
Collection<HoldingDataBean> |
getHoldings(String userID)
|
MarketSummaryDataBean |
getMarketSummary()
|
Collection<OrderDataBean> |
getOrders(String userID)
|
QuoteDataBean |
getQuote(String symbol)
|
double |
investmentReturn(double investment,
double NetValue)
|
AccountDataBean |
login(String userID,
String password)
|
void |
logout(String userID)
|
void |
orderCompleted(String userID,
Integer orderID)
|
QuoteDataBean |
pingTwoPhase(String symbol)
|
void |
postConstruct()
|
void |
queueOrder(Integer orderID,
boolean twoPhase)
|
AccountDataBean |
register(String userID,
String password,
String fullname,
String address,
String email,
String creditcard,
BigDecimal openBalance)
|
RunStatsDataBean |
resetTrade(boolean deleteAll)
|
OrderDataBean |
sell(String userID,
Integer holdingID,
int orderProcessingMode)
|
AccountProfileDataBean |
updateAccountProfile(AccountProfileDataBean profileData)
|
QuoteDataBean |
updateQuotePriceVolume(String symbol,
BigDecimal changeFactor,
double sharesTraded)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TradeSLSBBean
public TradeSLSBBean()
- Creates a new instance of TradeSLSBBean
getMarketSummary
public MarketSummaryDataBean getMarketSummary()
- Specified by:
getMarketSummary in interface TradeServices
buy
public OrderDataBean buy(String userID,
String symbol,
double quantity,
int orderProcessingMode)
- Specified by:
buy in interface TradeServices
sell
public OrderDataBean sell(String userID,
Integer holdingID,
int orderProcessingMode)
- Specified by:
sell in interface TradeServices
queueOrder
public void queueOrder(Integer orderID,
boolean twoPhase)
- Specified by:
queueOrder in interface TradeServices
completeOrder
public OrderDataBean completeOrder(Integer orderID,
boolean twoPhase)
throws Exception
- Specified by:
completeOrder in interface TradeServices
- Throws:
Exception
cancelOrder
public void cancelOrder(Integer orderID,
boolean twoPhase)
- Specified by:
cancelOrder in interface TradeServices
orderCompleted
public void orderCompleted(String userID,
Integer orderID)
- Specified by:
orderCompleted in interface TradeServices
getOrders
public Collection<OrderDataBean> getOrders(String userID)
- Specified by:
getOrders in interface TradeServices
getClosedOrders
public Collection<OrderDataBean> getClosedOrders(String userID)
- Specified by:
getClosedOrders in interface TradeServices
createQuote
public QuoteDataBean createQuote(String symbol,
String companyName,
BigDecimal price)
- Specified by:
createQuote in interface TradeServices
getQuote
public QuoteDataBean getQuote(String symbol)
- Specified by:
getQuote in interface TradeServices
getAllQuotes
public Collection<QuoteDataBean> getAllQuotes()
- Specified by:
getAllQuotes in interface TradeServices
updateQuotePriceVolume
public QuoteDataBean updateQuotePriceVolume(String symbol,
BigDecimal changeFactor,
double sharesTraded)
- Specified by:
updateQuotePriceVolume in interface TradeServices
getHoldings
public Collection<HoldingDataBean> getHoldings(String userID)
- Specified by:
getHoldings in interface TradeServices
getHolding
public HoldingDataBean getHolding(Integer holdingID)
- Specified by:
getHolding in interface TradeServices
getAccountData
public AccountDataBean getAccountData(String userID)
- Specified by:
getAccountData in interface TradeServices
getAccountProfileData
public AccountProfileDataBean getAccountProfileData(String userID)
- Specified by:
getAccountProfileData in interface TradeServices
updateAccountProfile
public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
- Specified by:
updateAccountProfile in interface TradeServices
login
public AccountDataBean login(String userID,
String password)
throws RollbackException
- Specified by:
login in interface TradeServices
- Throws:
RollbackException
logout
public void logout(String userID)
- Specified by:
logout in interface TradeServices
register
public AccountDataBean register(String userID,
String password,
String fullname,
String address,
String email,
String creditcard,
BigDecimal openBalance)
- Specified by:
register in interface TradeServices
resetTrade
public RunStatsDataBean resetTrade(boolean deleteAll)
throws Exception
- Specified by:
resetTrade in interface TradeServices
- Throws:
Exception
investmentReturn
public double investmentReturn(double investment,
double NetValue)
throws Exception
- Specified by:
investmentReturn in interface TradeSLSBLocal- Specified by:
investmentReturn in interface TradeSLSBRemote
- Throws:
Exception
pingTwoPhase
public QuoteDataBean pingTwoPhase(String symbol)
throws Exception
- Specified by:
pingTwoPhase in interface TradeSLSBLocal- Specified by:
pingTwoPhase in interface TradeSLSBRemote
- Throws:
Exception
postConstruct
@PostConstruct
public void postConstruct()
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.