KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > jmx > export > metadata > ManagedAttribute


1 /*
2  * Copyright 2002-2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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 /**
20  * Metadata that indicates to expose a given bean property as JMX attribute.
21  * Only valid when used on a JavaBean getter or setter.
22  *
23  * @author Rob Harrop
24  * @since 1.2
25  * @see org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
26  * @see org.springframework.jmx.export.MBeanExporter
27  */

28 public class ManagedAttribute extends AbstractJmxAttribute {
29
30     public static final ManagedAttribute EMPTY = new ManagedAttribute();
31
32
33     private Object JavaDoc defaultValue;
34
35     private String JavaDoc persistPolicy;
36
37     private int persistPeriod = -1;
38
39
40     public void setDefaultValue(Object JavaDoc defaultValue) {
41         this.defaultValue = defaultValue;
42     }
43
44     public Object JavaDoc getDefaultValue() {
45         return defaultValue;
46     }
47
48     public void setPersistPolicy(String JavaDoc persistPolicy) {
49         this.persistPolicy = persistPolicy;
50     }
51
52     public String JavaDoc getPersistPolicy() {
53         return persistPolicy;
54     }
55
56     public void setPersistPeriod(int persistPeriod) {
57         this.persistPeriod = persistPeriod;
58     }
59
60     public int getPersistPeriod() {
61         return persistPeriod;
62     }
63
64 }
65
Popular Tags