package examples;
import javax.ejb.*;
/**
* This is the local interface for AccountBean.
*
* This interface is what clients operate on when they interact with
* beans. The container will implement this interface; the
* implemented object is called the local object, which delegates
* invocations to the actual bean.
*/
public interface AccountLocal extends EJBLocalObject {
/**
* Deposits amt into account.
*/
public void deposit(double amt) throws AccountException;
/**
* Withdraws amt from bank account.
* @throw AccountException thrown in amt < available balance
*/
public void withdraw(double amt) throws AccountException;
// Getter/setter methods on Entity Bean fields
public double getBalance();
public String getOwnerName();
public void setOwnerName(String name);
public String getAccountID();
public void setAccountID(String id);
}
本文详细介绍了EJB中AccountBean的本地接口AccountLocal,包括存款、取款操作及余额、账户持有者等信息的获取与设置方法。此接口为客户端提供了与AccountBean交互的基础。
599

被折叠的 条评论
为什么被折叠?



