01: /*
02: * Copyright 2002-2005 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 notifcation types
37: * as comma-delimited String.
38: */
39: public void setNotificationType(String notificationType) {
40: this .notificationTypes = StringUtils
41: .commaDelimitedListToStringArray(notificationType);
42: }
43:
44: public void setNotificationTypes(String[] notificationTypes) {
45: this .notificationTypes = notificationTypes;
46: }
47:
48: public String[] getNotificationTypes() {
49: return notificationTypes;
50: }
51:
52: public void setName(String name) {
53: this .name = name;
54: }
55:
56: public String getName() {
57: return name;
58: }
59:
60: public void setDescription(String description) {
61: this .description = description;
62: }
63:
64: public String getDescription() {
65: return description;
66: }
67:
68: }
|