KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > 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.2 2004/01/07 07:43:17 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.stests.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 this Account, in a transaction.
77      * @param a num of the Account.
78      * @return balance
79      */

80     public int readBalanceTx(int a) throws RemoteException JavaDoc;
81
82     /**
83      * move form an Account to another one.
84      * @param d num of the debit Account.
85      * @param c num of the credit Account.
86      * @param v value to be moved
87      * @param d delay in second for the operation.
88      */

89     public void move(int d, int c, int v, int delay) throws RemoteException JavaDoc;
90 }
91
Popular Tags