01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: 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: * Starts notification fetching
22: *
23: * @see #stop
24: */
25: public void start();
26:
27: /**
28: * Stops notification fetching
29: *
30: * @see #start
31: */
32: public void stop();
33:
34: /**
35: * Returns whether the tuple is already present in this handler
36: */
37: public boolean contains(NotificationTuple tuple);
38:
39: /**
40: * Adds the given tuple with the given listener ID to this handler
41: *
42: * @see javax.management.MBeanServerConnection#addNotificationListener
43: * @see #removeNotificationListeners
44: */
45: public void addNotificationListener(Integer id,
46: 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[] 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 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[] ids);
70: }
|