KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > remote > RemoteNotificationClientHandler


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.remote;
10
11 /**
12  * Handles remote notification fetching on client side.
13  * It takes care of calling the server side with the correct protocol and to dispatch
14  * notifications to client-side listeners.
15  *
16  * @version $Revision: 1.10 $
17  * @see RemoteNotificationServerHandler
18  */

19 public interface RemoteNotificationClientHandler
20 {
21    /**
22     * Starts notification fetching
23     *
24     * @see #stop
25     */

26    public void start();
27
28    /**
29     * Stops notification fetching
30     *
31     * @see #start
32     */

33    public void stop();
34
35    /**
36     * Returns whether the tuple is already present in this handler
37     */

38    public boolean contains(NotificationTuple tuple);
39
40    /**
41     * Adds the given tuple with the given listener ID to this handler
42     *
43     * @see javax.management.MBeanServerConnection#addNotificationListener
44     * @see #removeNotificationListeners
45     */

46    public void addNotificationListener(Integer JavaDoc id, NotificationTuple tuple);
47
48    /**
49     * Returns the IDs of the listeners for the given tuple
50     *
51     * @see javax.management.MBeanServerConnection#removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener)
52     * @see #getNotificationListener
53     */

54    public Integer JavaDoc[] getNotificationListeners(NotificationTuple tuple);
55
56    /**
57     * Returns the ID of the listener for the given tuple
58     *
59     * @see javax.management.MBeanServerConnection#removeNotificationListener(javax.management.ObjectName, javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
60     * @see #getNotificationListeners
61     */

62    public Integer JavaDoc getNotificationListener(NotificationTuple tuple);
63
64    /**
65     * Removes the listeners with the given IDs from this handler
66     *
67     * @see #addNotificationListener
68     */

69    public void removeNotificationListeners(Integer JavaDoc[] ids);
70 }
71
Popular Tags