KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > stockonline > ejb > session > interf > Broker


1 /*
2  * StockOnline: EJB 1.1 Benchmark.
3  *
4  * Copyright Commonwealth Scientific and Industrial Research Organisation (CSIRO - www.csiro.au), Australia 2001, 2002, 2003.
5  *
6  * Contact: Paul.Brebner@csiro.au
7  *
8  * This library is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or any
11  * later version.
12  *
13  * This library is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16  * for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, write to the Free Software Foundation,
20  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21  *
22  * Originally developed for the CSIRO Middleware Technology Evaluation (MTE) Project, by
23  * the Software Architectures and Component Technologies Group, CSIRO Mathematical and Information Sciences
24  * Canberra and Sydney, Australia
25  *
26  * www.cmis.csiro.au/sact/
27  * www.cmis.csiro.au/adsat/mte.htm
28  *
29  * Initial developer(s): Shiping Chen, Paul Brebner, Lei Hu, Shuping Ran, Ian Gorton, Anna Liu.
30  * Contributor(s): ______________________.
31  */

32
33
34 //
35
//
36
// History:
37
// 10/08/2001 Shiping Initial coding based on the existing code
38
// 25/09/2001 Shiping Deprecated the queryStockValueByCode
39
//
40
//
41

42 package stockonline.ejb.session.interf;
43
44 import javax.ejb.EJBObject JavaDoc;
45 import java.rmi.RemoteException JavaDoc;
46 import java.util.Collection JavaDoc;
47
48 import stockonline.util.QueryResult;
49 import stockonline.util.CmdMessage;
50
51 /**
52  * This is the remote interface of the stockonline broker (session bean).
53  */

54
55 public interface Broker extends EJBObject JavaDoc
56 {
57     // Stockonline interface
58
//
59
public int newAccount(String JavaDoc name, String JavaDoc address, int credit) throws RemoteException JavaDoc, Exception JavaDoc;
60     public QueryResult queryStockValueByID(int stockID) throws RemoteException JavaDoc, Exception JavaDoc;
61     // public QueryResult queryStockValueByCode(String stockCode) throws RemoteException, Exception;
62
public void buyStock(int accountID, int stockID, int amount) throws RemoteException JavaDoc, Exception JavaDoc;
63     public void sellStock(int accountID, int stockID, int amount) throws RemoteException JavaDoc, Exception JavaDoc;
64     public void updateAccount(int accountID, int credit) throws RemoteException JavaDoc, Exception JavaDoc;
65     public Collection JavaDoc getHoldingStatement(int accountID, int startStockID) throws RemoteException JavaDoc, Exception JavaDoc;
66
67     // Extra interfaces for internal usage
68
//
69
public Collection JavaDoc cmdChannel(CmdMessage msg) throws RemoteException JavaDoc, Exception JavaDoc;
70     public int newAccountForTestRollback(String JavaDoc name, String JavaDoc address, int credit) throws RemoteException JavaDoc, Exception JavaDoc;
71     public boolean testRollback(int accountID) throws RemoteException JavaDoc, Exception JavaDoc;
72 }
73
Popular Tags