001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.mx.modelmbean;
023:
024: /**
025: * Constants used with Model MBean implementations.
026: *
027: * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
028: * @author <a href="mailto:thomas.diesler@jboss.com">Thomas Diesler</a>.
029: * @author <a href="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
030: * @author Matt Munz
031: * @version $Revision: 57200 $
032: */
033: public interface ModelMBeanConstants {
034: // Model MBean notification type string -------------------------
035: String GENERIC_MODELMBEAN_NOTIFICATION = "jmx.modelmbean.generic";
036:
037: // Mandatory descriptor fields -----------------------------------
038:
039: String NAME = "name";
040: String DESCRIPTOR_TYPE = "descriptorType";
041:
042: // Optional shared descriptor fields -----------------------------------
043:
044: String CLASS = "class";
045: String CURRENCY_TIME_LIMIT = "currencyTimeLimit";
046: String DISPLAY_NAME = "displayName";
047: String LAST_UPDATED_TIME_STAMP = "lastUpdatedTimeStamp";
048: String LOG = "log";
049: String LOG_FILE = "logFile";
050: String PERSIST_POLICY = "persistPolicy";
051: String PERSIST_PERIOD = "persistPeriod";
052: String PRESENTATION_STRING = "presentationString";
053: String VISIBILITY = "visibility";
054:
055: // MBean descriptor fields -----------------------------------
056:
057: String PERSIST_LOCATION = "persistLocation";
058: String PERSIST_NAME = "persistName";
059: String EXPORT = "export";
060:
061: // Attribute descriptor fields -----------------------------------
062:
063: String CACHED_VALUE = "value"; // cached value, may be disabled
064: String ATTRIBUTE_VALUE = "attributeValue"; // last attribute value set
065: String DEFAULT = "default"; // default, if no accessors defined
066: String GET_METHOD = "getMethod";
067: String SET_METHOD = "setMethod";
068: String PROTOCOL_MAP = "protocolMap";
069:
070: // constructor descriptor fields -----------------------------------
071:
072: String ROLE = "role";
073:
074: // Operation descriptor fields -----------------------------------
075:
076: String TARGET_OBJECT = "targetObject";
077: String TARGET_TYPE = "targetType";
078:
079: // Notification descriptor fields -----------------------------------
080:
081: String SEVERITY = "severity";
082: String MESSAGE_ID = "messageId";
083:
084: // Persistence policies ------------------------------------------
085: String PP_NEVER = "Never";
086: String PP_ON_TIMER = "OnTimer";
087: String PP_ON_UPDATE = "OnUpdate";
088: String PP_NO_MORE_OFTEN_THAN = "NoMoreOftenThan";
089: String PP_ALWAYS = "Always";
090:
091: String[] PERSIST_POLICIES = new String[] {
092: ModelMBeanConstants.PP_NEVER,
093: ModelMBeanConstants.PP_ON_TIMER,
094: ModelMBeanConstants.PP_ON_UPDATE,
095: ModelMBeanConstants.PP_NO_MORE_OFTEN_THAN,
096: ModelMBeanConstants.PP_ALWAYS };
097:
098: // Severities ------------------------------------------
099: String SEVERITY_UNKNOWN = "0";
100: String SEVERITY_NON_RECOVERABLE = "1";
101: String SEVERITY_CRITICAL = "2";
102: String SEVERITY_MAJOR = "3";
103: String SEVERITY_MINOR = "4";
104: String SEVERITY_WARNING = "5";
105: String SEVERITY_NORMAL = "6";
106:
107: // Descriptor types ----------------------------------------------
108:
109: String MBEAN_DESCRIPTOR = "mbean";
110: String ATTRIBUTE_DESCRIPTOR = "attribute";
111: String CONSTRUCTOR_DESCRIPTOR = "constructor";
112: String OPERATION_DESCRIPTOR = "operation";
113: String NOTIFICATION_DESCRIPTOR = "notification";
114:
115: // Role types ----------------------------------------------------
116:
117: String ROLE_CONSTRUCTOR = "constructor";
118: String ROLE_GETTER = "getter";
119: String ROLE_SETTER = "setter";
120: String ROLE_OPERATION = "operation";
121:
122: // Visibility values ---------------------------------------------
123: String HIGH_VISIBILITY = "1";
124: String NORMAL_VISIBILITY = "2";
125: String LOW_VISIBILITY = "3";
126: String MINIMAL_VISIBILITY = "4";
127:
128: // Cache policies ------------------------------------------------
129: String CACHE_NEVER = "-1";
130: long CACHE_NEVER_LIMIT = -1;
131: String CACHE_ALWAYS = "0";
132: long CACHE_ALWAYS_LIMIT = 0;
133:
134: // Operation impact ----------------------------------------------
135: String ACTION = "ACTION";
136: String ACTION_INFO = "ACTION_INFO";
137: String INFO = "INFO";
138:
139: // END of standard descriptor fields *****************************
140:
141: // Default Model MBean resource type, <tt>"ObjectReference"</tt>.
142: String OBJECT_REF = "ObjectReference";
143:
144: /**
145: * A convenience constant to use with
146: * {@link javax.management.modelmbean.ModelMBeanInfo#getDescriptors getDescriptors()}
147: * to return the descriptors of all management interface elements
148: * (a <tt>null</tt> string).
149: */
150: String ALL_DESCRIPTORS = null;
151:
152: // Optional descriptor fields ------------------------------------
153:
154: String LAST_RETURNED_TIME_STAMP = "lastReturnedTimestamp";
155:
156: /** used to mark the update (set) of an ATTRIBUTE_VALUE */
157: String LAST_UPDATED_TIME_STAMP2 = "lastUpdatedTimeStamp2";
158:
159: /** */
160: String INTERCEPTORS = "interceptors";
161: /**
162: * Indicates whether MBean Info should be stored.
163: */
164: String PERSIST_INFO = "persistmbeaninfo";
165: /**
166: * Indicates the FQN of the resource class
167: */
168: String RESOURCE_CLASS = "resourceClass";
169: /**
170: * constant used by the 1.0 xmbean parser
171: * this defines the name of the descriptor used to designate the persistence manager
172: * that is to be used for a given XMBean
173: */
174: String PERSISTENCE_MANAGER = "persistence-manager";
175:
176: /**
177: * Used to store the JMX ObjectName of the MBean, so it can be referenced
178: * by subsystem that may need it
179: */
180: String OBJECT_NAME = "objectname";
181:
182: /**
183: * Extended descriptor used in conjuction with DelegatingPersistenceManager
184: * to specify an external MBean service that will be used as a factory
185: * for creating AttributePersistenceManager objects.
186: *
187: * If the descriptor is not specified, the ObjectName below will be used
188: * as the default.
189: */
190: String DELEGATING_PM_SERVICE_DESCRIPTOR = "attribute-persistence-service";
191: String DELEGATING_PM_SERVICE_DEFAULT_VALUE = "jboss:service=AttributePersistenceService";
192:
193: /**
194: * Extended descriptor used in conjuction with DelegatingPersistenceManager
195: * to specify the operation name that will be called on the external MBean service
196: * for creating AttributePersistenceManager objects.
197: *
198: * If the descriptor is not specified, the default will apply
199: */
200: String DELEGATING_PM_OPERATION_DESCRIPTOR = "attribute-persistence-operation";
201: String DELEGATING_PM_OPERATION_DEFAULT_VALUE = "apmCreate";
202:
203: /** The MBeanServer injection id type */
204: final String MBEAN_SERVER_INJECTION_TYPE = "MBeanServerType";
205: /** The MBeanInfo injection id type */
206: final String MBEAN_INFO_INJECTION_TYPE = "MBeanInfoType";
207: /** The ObjectName injection id type */
208: final String OBJECT_NAME_INJECTION_TYPE = "ObjectNameType";
209:
210: // Constants for metadata objects --------------------------------
211: boolean IS_READABLE = true;
212: boolean IS_WRITABLE = true;
213: boolean IS_IS = true;
214: }
|