1 /*
2 * Copyright (c) 1998-2002 The Jgroup Team.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 *
17 */
18
19 package jgroup.relacs.daemon;
20
21 import java.rmi.Remote;
22 import java.rmi.RemoteException;
23
24 import jgroup.core.EndPoint;
25 import jgroup.core.MemberId;
26 import jgroup.relacs.events.Event;
27
28
29 /**
30 * The <code>DaemonService</code> interface describes the methods
31 * accessible remotely (same host, but distinct JVMs) from the daemon.
32 *
33 * @author Hein Meling
34 * @since Jgroup 1.2
35 */
36 public interface DaemonService
37 extends Remote
38 {
39
40 ////////////////////////////////////////////////////////////////////////////////////////////
41 // Constants
42 ////////////////////////////////////////////////////////////////////////////////////////////
43
44 /**
45 * Service name used to register each daemon in its bootstrap
46 * registry.
47 */
48 public static final String DAEMON_NAME = "Daemon";
49
50 ////////////////////////////////////////////////////////////////////////////////////////////
51 // Methods
52 ////////////////////////////////////////////////////////////////////////////////////////////
53
54 /**
55 * Returns a new member id for a new member. The new member id is
56 * obtained by concatenating the endpoint of this daemon, the
57 * incarnation number used to distinguish different incarnation of
58 * the same endpoint, and a sequence number used to distinguish
59 * different members.
60 */
61 public MemberId getMemberId(EndPoint endpoint)
62 throws RemoteException;
63
64
65 /**
66 * Returns the number of members associated with this Jgroup daemon.
67 */
68 public int members()
69 throws RemoteException;
70
71
72 /**
73 * Adds an event generated by a member to the local queue of events.
74 */
75 public void addEvent(Event event)
76 throws RemoteException;
77
78
79 } // END DaemonService