1 32 33 34 42 package stockonline.ejb.session.interf; 43 44 import javax.ejb.EJBObject ; 45 import java.rmi.RemoteException ; 46 import java.util.Collection ; 47 48 import stockonline.util.QueryResult; 49 import stockonline.util.CmdMessage; 50 51 54 55 public interface Broker extends EJBObject 56 { 57 public int newAccount(String name, String address, int credit) throws RemoteException , Exception ; 60 public QueryResult queryStockValueByID(int stockID) throws RemoteException , Exception ; 61 public void buyStock(int accountID, int stockID, int amount) throws RemoteException , Exception ; 63 public void sellStock(int accountID, int stockID, int amount) throws RemoteException , Exception ; 64 public void updateAccount(int accountID, int credit) throws RemoteException , Exception ; 65 public Collection getHoldingStatement(int accountID, int startStockID) throws RemoteException , Exception ; 66 67 public Collection cmdChannel(CmdMessage msg) throws RemoteException , Exception ; 70 public int newAccountForTestRollback(String name, String address, int credit) throws RemoteException , Exception ; 71 public boolean testRollback(int accountID) throws RemoteException , Exception ; 72 } 73 | Popular Tags |