01: /*
02: * Copyright 2002-2007 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.springframework.jmx.export.notification;
18:
19: /**
20: * Interface to be implemented by any Spring-managed resource that is to be
21: * registered with an {@link javax.management.MBeanServer} and wishes to send
22: * JMX {@link javax.management.Notification javax.management.Notifications}.
23: *
24: * <p>Provides Spring-created managed resources with a {@link NotificationPublisher}
25: * as soon as they are registered with the {@link javax.management.MBeanServer}.
26: *
27: * <p><b>NOTE:</b> This interface only applies to simple Spring-managed
28: * beans which happen to get exported through Spring's
29: * {@link org.springframework.jmx.export.MBeanExporter}.
30: * It does not apply to any non-exported beans; neither does it apply
31: * to standard MBeans exported by Spring. For standard JMX MBeans,
32: * consider implementing the {@link javax.management.modelmbean.ModelMBeanNotificationBroadcaster}
33: * interface (or implementing a full {@link javax.management.modelmbean.ModelMBean}).
34: *
35: * @author Rob Harrop
36: * @since 2.0
37: * @see NotificationPublisher
38: */
39: public interface NotificationPublisherAware {
40:
41: /**
42: * Set the {@link NotificationPublisher} instance for the current managed resource instance.
43: */
44: void setNotificationPublisher(
45: NotificationPublisher notificationPublisher);
46:
47: }
|