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: Worker.java 6515 2005-04-07 09:37:22Z durieuxp $
23: * --------------------------------------------------------------------------
24: */
25:
26: package org.objectweb.jonas.jtests.beans.worker;
27:
28: import java.rmi.RemoteException;
29: import javax.ejb.RemoveException;
30: import javax.ejb.EJBObject;
31:
32: /**
33: * Worker remote interface
34: * @author Philippe Durieux
35: */
36: public interface Worker extends EJBObject {
37:
38: /**
39: * set the count
40: */
41: public void setwcount(int c) throws RemoteException;
42:
43: /**
44: * get the count
45: */
46: public int getwcount() throws RemoteException;
47:
48: /**
49: * get the notify accepted count
50: */
51: public int getNotifyAccepted() throws RemoteException;
52:
53: /**
54: * get the notify started count
55: */
56: public int getNotifyStarted() throws RemoteException;
57:
58: /**
59: * get the notify rejected count
60: */
61: public int getNotifyRejected() throws RemoteException;
62:
63: /**
64: * get the notify completed count
65: */
66: public int getNotifyCompleted() throws RemoteException;
67:
68: /**
69: * Run n works, synchronously.
70: */
71: public void doWorks(int n) throws RemoteException;
72:
73: /**
74: * Start n works
75: */
76: public void startWorks(int n) throws RemoteException;
77:
78: /**
79: * Schedule n works
80: * Notifications are sent (a WorkListner is used)
81: */
82: public void scheduleWorks(int n, long timeout)
83: throws RemoteException;
84:
85: /**
86: * Run 1 work synchronously in a TX
87: */
88: public void doWorkInTx() throws RemoteException;
89:
90: /**
91: * Start 1 work in a TX
92: */
93: public void startWorkInTx() throws RemoteException;
94:
95: /**
96: * Schedule 1 work in a TX
97: */
98: public void scheduleWorkInTx() throws RemoteException;
99: }
|