KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtests > beans > worker > Worker


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: Worker.java,v 1.1 2005/04/07 09:37:22 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

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

36 public interface Worker extends EJBObject JavaDoc {
37
38     /**
39      * set the count
40      */

41     public void setwcount(int c) throws RemoteException JavaDoc;
42
43     /**
44      * get the count
45      */

46     public int getwcount() throws RemoteException JavaDoc;
47
48     /**
49      * get the notify accepted count
50      */

51     public int getNotifyAccepted() throws RemoteException JavaDoc;
52
53     /**
54      * get the notify started count
55      */

56     public int getNotifyStarted() throws RemoteException JavaDoc;
57
58     /**
59      * get the notify rejected count
60      */

61     public int getNotifyRejected() throws RemoteException JavaDoc;
62
63     /**
64      * get the notify completed count
65      */

66     public int getNotifyCompleted() throws RemoteException JavaDoc;
67
68     /**
69      * Run n works, synchronously.
70      */

71     public void doWorks(int n) throws RemoteException JavaDoc;
72
73     /**
74      * Start n works
75      */

76     public void startWorks(int n) throws RemoteException JavaDoc;
77
78     /**
79      * Schedule n works
80      * Notifications are sent (a WorkListner is used)
81      */

82     public void scheduleWorks(int n, long timeout) throws RemoteException JavaDoc;
83
84     /**
85      * Run 1 work synchronously in a TX
86      */

87     public void doWorkInTx() throws RemoteException JavaDoc;
88
89     /**
90      * Start 1 work in a TX
91      */

92     public void startWorkInTx() throws RemoteException JavaDoc;
93
94     /**
95      * Schedule 1 work in a TX
96      */

97     public void scheduleWorkInTx() throws RemoteException JavaDoc;
98 }
99
Popular Tags