KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 2002-2006 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 indicating that instances of an annotated class
21  * are to be registered with a JMX server.
22  * Only valid when used on a <code>Class</code>.
23  *
24  * @author Rob Harrop
25  * @since 1.2
26  * @see org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
27  * @see org.springframework.jmx.export.naming.MetadataNamingStrategy
28  * @see org.springframework.jmx.export.MBeanExporter
29  */

30 public class ManagedResource extends AbstractJmxAttribute {
31
32     private String JavaDoc objectName;
33
34     private boolean log = false;
35
36     private String JavaDoc logFile;
37
38     private String JavaDoc persistPolicy;
39
40     private int persistPeriod = -1;
41
42     private String JavaDoc persistName;
43
44     private String JavaDoc persistLocation;
45
46
47     public void setObjectName(String JavaDoc objectName) {
48         this.objectName = objectName;
49     }
50
51     public String JavaDoc getObjectName() {
52         return this.objectName;
53     }
54
55     public void setLog(boolean log) {
56         this.log = log;
57     }
58
59     public boolean isLog() {
60         return log;
61     }
62
63     public void setLogFile(String JavaDoc logFile) {
64         this.logFile = logFile;
65     }
66
67     public String JavaDoc getLogFile() {
68         return logFile;
69     }
70
71     public void setPersistPolicy(String JavaDoc persistPolicy) {
72         this.persistPolicy = persistPolicy;
73     }
74
75     public String JavaDoc getPersistPolicy() {
76         return persistPolicy;
77     }
78
79     public void setPersistPeriod(int persistPeriod) {
80         this.persistPeriod = persistPeriod;
81     }
82
83     public int getPersistPeriod() {
84         return persistPeriod;
85     }
86
87     public void setPersistName(String JavaDoc persistName) {
88         this.persistName = persistName;
89     }
90
91     public String JavaDoc getPersistName() {
92         return persistName;
93     }
94
95     public void setPersistLocation(String JavaDoc persistLocation) {
96         this.persistLocation = persistLocation;
97     }
98
99     public String JavaDoc getPersistLocation() {
100         return persistLocation;
101     }
102
103 }
104
Popular Tags