01: /*
02: * JOnAS: Java(TM) Open Application Server
03: * Copyright (C) 1999 Bull S.A.
04: * Contact: jonas-team@objectweb.org
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * 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 3992 2004-01-07 07:43:17Z durieuxp $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.stests.bank;
27:
28: import java.rmi.RemoteException;
29: import javax.ejb.RemoveException;
30: import javax.ejb.EJBObject;
31:
32: /**
33: * Manager remote interface
34: * @author Philippe Durieux
35: */
36: public interface Manager extends EJBObject {
37:
38: /**
39: * create a set of Accounts
40: * @param nb nb of Accounts created.
41: */
42: public void createAll(int nb) throws RemoteException;
43:
44: /**
45: * reinit all created accounts to their initial value.
46: */
47: public void reinitAll() throws RemoteException;
48:
49: /**
50: * Remove an Account
51: * @param d1 num of the Account.
52: */
53: public void delAccount(int d1) throws RemoteException,
54: RemoveException;
55:
56: /**
57: * Check all existing Accounts
58: * @return true if all are OK.
59: */
60: public boolean checkAll() throws RemoteException;
61:
62: /**
63: * Check an existing Account
64: * @param a num of the Account.
65: * @return true if OK.
66: */
67: public boolean checkAccount(int a) throws RemoteException;
68:
69: /**
70: * read balance for this Account
71: * @param a num of the Account.
72: * @return balance
73: */
74: public int readBalance(int a) throws RemoteException;
75:
76: /**
77: * read balance for this Account, in a transaction.
78: * @param a num of the Account.
79: * @return balance
80: */
81: public int readBalanceTx(int a) throws RemoteException;
82:
83: /**
84: * move form an Account to another one.
85: * @param d num of the debit Account.
86: * @param c num of the credit Account.
87: * @param v value to be moved
88: * @param d delay in second for the operation.
89: */
90: public void move(int d, int c, int v, int delay)
91: throws RemoteException;
92: }
|