01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)EventNotifierMBean.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi.management;
30:
31: import javax.management.NotificationEmitter;
32: import javax.management.ObjectName;
33:
34: /**
35: * This interface defines the DAS event notifier MBean, which collects event
36: * notifications from all instances within the domain, and re-emits them. This
37: * allows a client to register as a notification listener with this MBean and
38: * automatically receive notifications from all instances within the domain.
39: * Event notifications are generated for all events affecting the state of the
40: * runtime, such as startup and shutdown of the runtime, installation or
41: * uninstallation of a component or shared library, deployment or undeployment
42: * of a service assembly, and life cycle operations on components and service
43: * assemblies.
44: *
45: * @author Mark S White
46: */
47: public interface EventNotifierMBean extends NotificationEmitter {
48: /**
49: * This method is called to disable event notifications.
50: *
51: * @return true if notifications were previously enabled, or false if
52: * they were already disabled.
53: */
54: boolean disableNotifications();
55:
56: /**
57: * This method is called to enable event notifications.
58: *
59: * @return true if notifications were previously disabled, or false if
60: * they were already enabled.
61: */
62: boolean enableNotifications();
63:
64: /**
65: * This method is called to inform the DAS that an instance has started
66: * and it needs to register itself as a notification listener for the
67: * event notifier MBean on that instance.
68: *
69: * @param instanceName the name of the instance that has started.
70: * @param objectName the JMX object name of the event notifier MBean for
71: * the instance.
72: * @return true if the registration was successful, or false if not.
73: */
74: boolean instanceStarted(String instanceName, ObjectName objectName);
75:
76: /**
77: * This method is called to inform the DAS that an instance has stopped
78: * and it needs to unregister itself as a notification listener for the
79: * event notifier MBean on that instance.
80: *
81: * @param instanceName the name of the instance that has stopped.
82: * @param objectName the JMX object name of the event notifier MBean for
83: * the instance.
84: * @return true if the unregistration was successful, or false if not.
85: */
86: boolean instanceStopped(String instanceName, ObjectName objectName);
87: }
|