All Examples  All EJB Examples  This Package

Interface examples.ejb.basic.statefulSession.Trader

public interface Trader
extends EJBObject
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.

Author:
Copyright (c) 1998 by WebLogic, Inc. All Rights Reserved.
Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.

Method Index

 o buy(String, String, int)
Buys shares of a stock for a named customer.
 o getBalance()
Returns the current balance of a trading session.
 o getTraderName()
Returns the name of this Trader.
 o sell(String, String, int)
Sells shares of a stock for a named customer.

Methods

 o buy
 public abstract TradeResult buy(String customerName,
                                 String stockSymbol,
                                 int shares) throws ProcessingErrorException, RemoteException
Buys shares of a stock for a named customer.

Parameters:
customerName - String Customer name
stockSymbol - String Stock symbol
shares - int Number of shares to buy
Returns:
TradeResult Trade Result
Throws: ProcessingErrorException
if there is an error while buying the shares
Throws: RemoteException
if there is a communications or systems failure
 o sell
 public abstract TradeResult sell(String customerName,
                                  String stockSymbol,
                                  int shares) throws ProcessingErrorException, RemoteException
Sells shares of a stock for a named customer.

Parameters:
customerName - String Customer name
stockSymbol - String Stock symbol
shares - int Number of shares to buy
Returns:
TradeResult Trade Result
Throws: ProcessingErrorException
if there is an error while selling the shares
Throws: RemoteException
if there is a communications or systems failure
 o getBalance
 public abstract double getBalance() throws RemoteException
Returns the current balance of a trading session.

Returns:
double Balance
Throws: RemoteException
if there is a communications or systems failure
 o getTraderName
 public abstract String getTraderName() throws RemoteException
Returns the name of this Trader.

Returns:
String Trader Name
Throws: RemoteException
if there is a communications or systems failure

All Examples  All EJB Examples  This Package