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.metadata;
18:
19: import org.springframework.util.StringUtils;
20:
21: /**
22: * Metadata that indicates a JMX notification emitted by a bean.
23: *
24: * @author Rob Harrop
25: * @since 2.0
26: */
27: public class ManagedNotification {
28:
29: private String[] notificationTypes;
30:
31: private String name;
32:
33: private String description;
34:
35: /**
36: * Set a single notification type, or a list of notification types
37: * as comma-delimited String.
38: */
39: public void setNotificationType(String notificationType) {
40: this .notificationTypes = StringUtils
41: .commaDelimitedListToStringArray(notificationType);
42: }
43:
44: /**
45: * Set a list of notification types.
46: */
47: public void setNotificationTypes(String[] notificationTypes) {
48: this .notificationTypes = notificationTypes;
49: }
50:
51: /**
52: * Return the list of notification types.
53: */
54: public String[] getNotificationTypes() {
55: return this .notificationTypes;
56: }
57:
58: /**
59: * Set the name of this notification.
60: */
61: public void setName(String name) {
62: this .name = name;
63: }
64:
65: /**
66: * Return the name of this notification.
67: */
68: public String getName() {
69: return this .name;
70: }
71:
72: /**
73: * Set a description for this notification.
74: */
75: public void setDescription(String description) {
76: this .description = description;
77: }
78:
79: /**
80: * Return a description for this notification.
81: */
82: public String getDescription() {
83: return this.description;
84: }
85:
86: }
|