|
| WebLogic Server 6.0 Code Examples, BEA Systems, Inc. |
SUMMARY: INNER | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD |
examples.ejb20.basic.statefulSession
Interface Trader
- All Superinterfaces:
- javax.ejb.EJBObject, java.rmi.Remote
- public interface Trader
- extends javax.ejb.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-2000 by BEA Systems, Inc. All Rights Reserved.
Method Summary |
TradeResult |
buy(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
Buys shares of a stock for a named customer. |
double |
getBalance()
Returns the current balance of a trading session. |
TradeResult |
sell(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
Sells shares of a stock for a named customer. |
Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
buy
public TradeResult buy(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
throws ProcessingErrorException,
java.rmi.RemoteException
- Buys shares of a stock for a named customer.
- Parameters:
customerName
- String Customer namestockSymbol
- String Stock symbolshares
- int Number of shares to buy- Returns:
- TradeResult Trade Result
- Throws:
ProcessingErrorException
- if there is an error while buying the sharesjava.rmi.RemoteException
- if there is
a communications or systems failure
getBalance
public double getBalance()
throws java.rmi.RemoteException
- Returns the current balance of a trading session.
- Returns:
- double Balance
- Throws:
java.rmi.RemoteException
- if there is
a communications or systems failure
sell
public TradeResult sell(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
throws ProcessingErrorException,
java.rmi.RemoteException
- Sells shares of a stock for a named customer.
- Parameters:
customerName
- String Customer namestockSymbol
- String Stock symbolshares
- int Number of shares to buy- Returns:
- TradeResult Trade Result
- Throws:
ProcessingErrorException
- if there is an error while selling the sharesjava.rmi.RemoteException
- if there is
a communications or systems failure
Copyright © 2000 BEA Systems, Inc. All Rights Reserved.