001: /*
002: * Copyright 2002-2006 the original author or authors.
003: *
004: * Licensed under the Apache License, Version 2.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.apache.org/licenses/LICENSE-2.0
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016:
017: package org.springframework.jmx.export.metadata;
018:
019: /**
020: * Metadata indicating that instances of an annotated class
021: * are to be registered with a JMX server.
022: * Only valid when used on a <code>Class</code>.
023: *
024: * @author Rob Harrop
025: * @since 1.2
026: * @see org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler
027: * @see org.springframework.jmx.export.naming.MetadataNamingStrategy
028: * @see org.springframework.jmx.export.MBeanExporter
029: */
030: public class ManagedResource extends AbstractJmxAttribute {
031:
032: private String objectName;
033:
034: private boolean log = false;
035:
036: private String logFile;
037:
038: private String persistPolicy;
039:
040: private int persistPeriod = -1;
041:
042: private String persistName;
043:
044: private String persistLocation;
045:
046: public void setObjectName(String objectName) {
047: this .objectName = objectName;
048: }
049:
050: public String getObjectName() {
051: return this .objectName;
052: }
053:
054: public void setLog(boolean log) {
055: this .log = log;
056: }
057:
058: public boolean isLog() {
059: return log;
060: }
061:
062: public void setLogFile(String logFile) {
063: this .logFile = logFile;
064: }
065:
066: public String getLogFile() {
067: return logFile;
068: }
069:
070: public void setPersistPolicy(String persistPolicy) {
071: this .persistPolicy = persistPolicy;
072: }
073:
074: public String getPersistPolicy() {
075: return persistPolicy;
076: }
077:
078: public void setPersistPeriod(int persistPeriod) {
079: this .persistPeriod = persistPeriod;
080: }
081:
082: public int getPersistPeriod() {
083: return persistPeriod;
084: }
085:
086: public void setPersistName(String persistName) {
087: this .persistName = persistName;
088: }
089:
090: public String getPersistName() {
091: return persistName;
092: }
093:
094: public void setPersistLocation(String persistLocation) {
095: this .persistLocation = persistLocation;
096: }
097:
098: public String getPersistLocation() {
099: return persistLocation;
100: }
101:
102: }
|