org.apache.geronimo.samples.daytrader.ejb3
Class DirectSLSBBean

java.lang.Object
  extended by org.apache.geronimo.samples.daytrader.ejb3.DirectSLSBBean
All Implemented Interfaces:
Remote, TradeServices, DirectSLSBLocal, DirectSLSBRemote

public class DirectSLSBBean
extends Object
implements DirectSLSBRemote, DirectSLSBLocal


Constructor Summary
DirectSLSBBean()
           
 
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 getAllQuotes()
           
 Collection getClosedOrders(String userID)
           
 HoldingDataBean getHolding(Integer holdingID)
           
 Collection getHoldings(String userID)
           
 MarketSummaryDataBean getMarketSummary()
           
 Collection getOrders(String userID)
           
 QuoteDataBean getQuote(String symbol)
           
 AccountDataBean login(String userID, String password)
           
 void logout(String userID)
           
 void orderCompleted(String userID, Integer orderID)
           
 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 newPrice, double sharesTraded)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectSLSBBean

public DirectSLSBBean()
Method Detail

getMarketSummary

public MarketSummaryDataBean getMarketSummary()
                                       throws Exception
Specified by:
getMarketSummary in interface TradeServices
Throws:
Exception

buy

public OrderDataBean buy(String userID,
                         String symbol,
                         double quantity,
                         int orderProcessingMode)
                  throws Exception
Specified by:
buy in interface TradeServices
Throws:
Exception

sell

public OrderDataBean sell(String userID,
                          Integer holdingID,
                          int orderProcessingMode)
                   throws Exception
Specified by:
sell in interface TradeServices
Throws:
Exception

queueOrder

public void queueOrder(Integer orderID,
                       boolean twoPhase)
                throws Exception
Specified by:
queueOrder in interface TradeServices
Throws:
Exception

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)
                 throws Exception
Specified by:
cancelOrder in interface TradeServices
Throws:
Exception

orderCompleted

public void orderCompleted(String userID,
                           Integer orderID)
                    throws Exception
Specified by:
orderCompleted in interface TradeServices
Throws:
Exception

getOrders

public Collection getOrders(String userID)
                     throws Exception
Specified by:
getOrders in interface TradeServices
Throws:
Exception

getClosedOrders

public Collection getClosedOrders(String userID)
                           throws Exception
Specified by:
getClosedOrders in interface TradeServices
Throws:
Exception

createQuote

public QuoteDataBean createQuote(String symbol,
                                 String companyName,
                                 BigDecimal price)
                          throws Exception
Specified by:
createQuote in interface TradeServices
Throws:
Exception

getQuote

public QuoteDataBean getQuote(String symbol)
                       throws Exception
Specified by:
getQuote in interface TradeServices
Throws:
Exception

getAllQuotes

public Collection getAllQuotes()
                        throws Exception
Specified by:
getAllQuotes in interface TradeServices
Throws:
Exception

updateQuotePriceVolume

public QuoteDataBean updateQuotePriceVolume(String symbol,
                                            BigDecimal newPrice,
                                            double sharesTraded)
                                     throws Exception
Specified by:
updateQuotePriceVolume in interface TradeServices
Throws:
Exception

getHoldings

public Collection getHoldings(String userID)
                       throws Exception
Specified by:
getHoldings in interface TradeServices
Throws:
Exception

getHolding

public HoldingDataBean getHolding(Integer holdingID)
                           throws Exception
Specified by:
getHolding in interface TradeServices
Throws:
Exception

getAccountData

public AccountDataBean getAccountData(String userID)
                               throws Exception
Specified by:
getAccountData in interface TradeServices
Throws:
Exception

getAccountProfileData

public AccountProfileDataBean getAccountProfileData(String userID)
                                             throws Exception
Specified by:
getAccountProfileData in interface TradeServices
Throws:
Exception

updateAccountProfile

public AccountProfileDataBean updateAccountProfile(AccountProfileDataBean profileData)
                                            throws Exception
Specified by:
updateAccountProfile in interface TradeServices
Throws:
Exception

login

public AccountDataBean login(String userID,
                             String password)
                      throws Exception
Specified by:
login in interface TradeServices
Throws:
Exception

logout

public void logout(String userID)
            throws Exception
Specified by:
logout in interface TradeServices
Throws:
Exception

register

public AccountDataBean register(String userID,
                                String password,
                                String fullname,
                                String address,
                                String email,
                                String creditcard,
                                BigDecimal openBalance)
                         throws Exception
Specified by:
register in interface TradeServices
Throws:
Exception

resetTrade

public RunStatsDataBean resetTrade(boolean deleteAll)
                            throws Exception
Specified by:
resetTrade in interface TradeServices
Throws:
Exception


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.