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: Sender.java 334 2002-05-03 15:10:16Z jonas $
23: * --------------------------------------------------------------------------
24: */
25:
26: // Sender.java
27: package org.objectweb.jonas.jtests.beans.message;
28:
29: import java.rmi.RemoteException;
30: import javax.ejb.EJBObject;
31:
32: /**
33: * Sender remote interface
34: */
35: public interface Sender extends EJBObject {
36:
37: /**
38: * send a message on topic
39: * @param String destination
40: * @param int value set in message
41: * @param int nb of messages sent
42: */
43: public void sendOnTopic(String dest, int val, int nb)
44: throws RemoteException;
45:
46: /**
47: * send messages on topic (transacted)
48: * @param String destination
49: * @param int value set in message
50: * @param int nb of messages sent
51: */
52: public void sendOnTopicTx(String dest, int val, int nb)
53: throws RemoteException;
54:
55: /**
56: * send a message on queue
57: * @param String destination
58: * @param int value set in message
59: * @param int nb of messages sent
60: */
61: public void sendOnQueue(String dest, int val, int nb)
62: throws RemoteException;
63:
64: /**
65: * send a message on queue (transacted)
66: * @param String destination
67: * @param int value set in message
68: * @param int nb of messages sent
69: */
70: public void sendOnQueueTx(String dest, int val, int nb)
71: throws RemoteException;
72:
73: /**
74: * Checking send methods
75: * When the correct number of messages has been retrieved, the records
76: * are cleaned up in the database, for further tries.
77: * @param int value looked in messages received
78: * @param int nb of messages that could be received
79: * @param int nb of seconds max to wait for all messages
80: * @return actual nb of messages received
81: */
82: public int check(int val, int nb, int sec) throws RemoteException;
83:
84: /**
85: * Clean all entity beans for this value
86: */
87: public void clean(int val) throws RemoteException;
88: }
|