KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > bank > Manager


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: Manager.java,v 1.1 2004/08/20 14:55:05 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.jtests.beans.bank;
27
28 import java.rmi.RemoteException JavaDoc;
29 import javax.ejb.RemoveException JavaDoc;
30 import javax.ejb.EJBObject JavaDoc;
31
32 /**
33  * Manager remote interface
34  * @author Philippe Durieux
35  */

36 public interface Manager extends EJBObject JavaDoc {
37
38     /**
39      * create a set of Accounts
40      * @param nb nb of Accounts created.
41      */

42     public void createAll(int nb) throws RemoteException JavaDoc;
43
44     /**
45      * reinit all created accounts to their initial value.
46      */

47     public void reinitAll() throws RemoteException JavaDoc;
48
49     /**
50      * Remove an Account
51      * @param d1 num of the Account.
52      */

53     public void delAccount(int d1) throws RemoteException JavaDoc, RemoveException JavaDoc;
54
55     /**
56      * Check all existing Accounts
57      * @return true if all are OK.
58      */

59     public boolean checkAll() throws RemoteException JavaDoc;
60
61     /**
62      * Check an existing Account
63      * @param a num of the Account.
64      * @return true if OK.
65      */

66     public boolean checkAccount(int a) throws RemoteException JavaDoc;
67
68     /**
69      * read balance for this Account
70      * @param a num of the Account.
71      * @return balance
72      */

73     public int readBalance(int a) throws RemoteException JavaDoc;
74
75     /**
76      * read balance for last accessed Account
77      * @return balance
78      */

79     public int readBalance() throws RemoteException JavaDoc;
80
81     /**
82      * read balance for this Account, in a transaction.
83      * @param a num of the Account.
84      * @return balance
85      */

86     public int readBalanceTx(int a) throws RemoteException JavaDoc;
87
88     /**
89      * move form an Account to another one.
90      * @param d num of the debit Account.
91      * @param c num of the credit Account.
92      * @param v value to be moved
93      * @param d delay in second for the operation.
94      */

95     public void move(int d, int c, int v, int delay) throws RemoteException JavaDoc;
96 }
97
Popular Tags