1 /*
2 * (C) 2002 David Carr david@carr.name
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 package net.sourceforge.mflow.api;
20
21 /***
22 * Interface to represent an object that produces Msg's
23 *
24 * @author <a href="mailto:david@carr.name">David Carr</a>
25 * @version $Revision: 1.3 $
26 */
27 public interface MsgSource extends MsgFlowComponent {
28 /***
29 * Adds a MsgReceiver to receive any Msg's that this MsgSource produces
30 *
31 * @param receiver the receiver to add
32 */
33 void addReceiver(MsgReceiver receiver);
34
35 /***
36 * Removes a MsgReceiver from receiving Msg's from this MsgSource
37 *
38 * @param receiver the receiver to remove
39 */
40 void removeReceiver(MsgReceiver receiver);
41
42 /***
43 * Mutator for all of the MsgReceivers to receive Msg's from this MsgSource
44 *
45 * @param receivers the array of new MsgReceivers
46 */
47 void setReceivers(MsgReceiver[] receivers);
48
49 /***
50 * Accessor for all of the MsgReceivers currently receiving Msg's from this
51 * MsgSource
52 *
53 * @return the array of MsgReceivers currently receiving Msg's from this
54 * MsgSource
55 */
56 MsgReceiver[] getReceivers();
57
58 /***
59 * Method to request that the MsgSource send any queued Msg's to its
60 * receivers. An MsgSource is not obligated to wait to send its Msg's;
61 * It is up to the MsgSource to determine whether to send them as soon as they
62 * are created or to wait for a send().
63 */
64 void send();
65 }
This page was automatically generated by Maven