All Examples  All EJB Examples  This Package

Interface examples.ejb.basic.statelessSession.Trader


public interface Trader
The methods in this interface are the public face of TraderBean. The signatures of the methods are identical to those of the EJBean, except that these methods throw a java.rmi.RemoteException. Note that the EJBean does not implement this interface. The corresponding code-generated EJBObject, TraderBeanE, implements this interface and delegates to the bean.


Method Index

 o buy(String, int)
Buys shares of a stock.
 o sell(String, int)
Sells shares of a stock.

Method Detail

 o buy

public TradeResult buy(java.lang.String stockSymbol,
                       int shares) throws java.rmi.RemoteException
          Buys shares of a stock.
Parameters:
stockSymbol - String Stock symbol
shares - int Number of shares to buy
Returns:
TradeResult Trade Result
Throws:
java.rmi.RemoteException - if there is a communications or systems failure
 o sell

public TradeResult sell(java.lang.String stockSymbol,
                        int shares) throws java.rmi.RemoteException
          Sells shares of a stock.
Parameters:
stockSymbol - String Stock symbol
shares - int Number of shares to sell
Returns:
TradeResult Trade Result
Throws:
java.rmi.RemoteException - if there is a communications or systems failure


All Examples  All EJB Examples  This Package