KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > mx > modelmbean > ModelMBeanConstants


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.mx.modelmbean;
23
24 /**
25  * Constants used with Model MBean implementations.
26  *
27  * @author <a HREF="mailto:juha@jboss.org">Juha Lindfors</a>.
28  * @author <a HREF="mailto:thomas.diesler@jboss.com">Thomas Diesler</a>.
29  * @author <a HREF="mailto:dimitris@jboss.org">Dimitris Andreadis</a>.
30  * @author Matt Munz
31  * @version $Revision: 37459 $
32  */

33 public interface ModelMBeanConstants
34 {
35    // Model MBean notification type string -------------------------
36
String JavaDoc GENERIC_MODELMBEAN_NOTIFICATION = "jmx.modelmbean.generic";
37
38    // Mandatory descriptor fields -----------------------------------
39

40    String JavaDoc NAME = "name";
41    String JavaDoc DESCRIPTOR_TYPE = "descriptorType";
42
43    // Optional shared descriptor fields -----------------------------------
44

45    String JavaDoc CLASS = "class";
46    String JavaDoc CURRENCY_TIME_LIMIT = "currencyTimeLimit";
47    String JavaDoc DISPLAY_NAME = "displayName";
48    String JavaDoc LAST_UPDATED_TIME_STAMP = "lastUpdatedTimeStamp";
49    String JavaDoc LOG = "log";
50    String JavaDoc LOG_FILE = "logFile";
51    String JavaDoc PERSIST_POLICY = "persistPolicy";
52    String JavaDoc PERSIST_PERIOD = "persistPeriod";
53    String JavaDoc PRESENTATION_STRING = "presentationString";
54    String JavaDoc VISIBILITY = "visibility";
55
56    // MBean descriptor fields -----------------------------------
57

58    String JavaDoc PERSIST_LOCATION = "persistLocation";
59    String JavaDoc PERSIST_NAME = "persistName";
60    String JavaDoc EXPORT = "export";
61
62    // Attribute descriptor fields -----------------------------------
63

64    String JavaDoc CACHED_VALUE = "value"; // cached value, may be disabled
65
String JavaDoc ATTRIBUTE_VALUE = "attributeValue"; // last attribute value set
66
String JavaDoc DEFAULT = "default"; // default, if no accessors defined
67
String JavaDoc GET_METHOD = "getMethod";
68    String JavaDoc SET_METHOD = "setMethod";
69    String JavaDoc PROTOCOL_MAP = "protocolMap";
70
71    // constructor descriptor fields -----------------------------------
72

73    String JavaDoc ROLE = "role";
74
75    // Operation descriptor fields -----------------------------------
76

77    String JavaDoc TARGET_OBJECT = "targetObject";
78    String JavaDoc TARGET_TYPE = "targetType";
79
80    // Notification descriptor fields -----------------------------------
81

82    String JavaDoc SEVERITY = "severity";
83    String JavaDoc MESSAGE_ID = "messageId";
84
85    // Persistence policies ------------------------------------------
86
String JavaDoc PP_NEVER = "Never";
87    String JavaDoc PP_ON_TIMER = "OnTimer";
88    String JavaDoc PP_ON_UPDATE = "OnUpdate";
89    String JavaDoc PP_NO_MORE_OFTEN_THAN = "NoMoreOftenThan";
90    String JavaDoc PP_ALWAYS = "Always";
91
92    String JavaDoc[] PERSIST_POLICIES = new String JavaDoc[]
93    {
94       ModelMBeanConstants.PP_NEVER,
95       ModelMBeanConstants.PP_ON_TIMER,
96       ModelMBeanConstants.PP_ON_UPDATE,
97       ModelMBeanConstants.PP_NO_MORE_OFTEN_THAN,
98       ModelMBeanConstants.PP_ALWAYS
99    };
100
101    // Severities ------------------------------------------
102
String JavaDoc SEVERITY_UNKNOWN = "0";
103    String JavaDoc SEVERITY_NON_RECOVERABLE = "1";
104    String JavaDoc SEVERITY_CRITICAL = "2";
105    String JavaDoc SEVERITY_MAJOR = "3";
106    String JavaDoc SEVERITY_MINOR = "4";
107    String JavaDoc SEVERITY_WARNING = "5";
108    String JavaDoc SEVERITY_NORMAL = "6";
109
110    // Descriptor types ----------------------------------------------
111

112    String JavaDoc MBEAN_DESCRIPTOR = "mbean";
113    String JavaDoc ATTRIBUTE_DESCRIPTOR = "attribute";
114    String JavaDoc CONSTRUCTOR_DESCRIPTOR = "constructor";
115    String JavaDoc OPERATION_DESCRIPTOR = "operation";
116    String JavaDoc NOTIFICATION_DESCRIPTOR = "notification";
117
118    // Role types ----------------------------------------------------
119

120    String JavaDoc ROLE_CONSTRUCTOR = "constructor";
121    String JavaDoc ROLE_GETTER = "getter";
122    String JavaDoc ROLE_SETTER = "setter";
123    String JavaDoc ROLE_OPERATION = "operation";
124
125    // Visibility values ---------------------------------------------
126
String JavaDoc HIGH_VISIBILITY = "1";
127    String JavaDoc NORMAL_VISIBILITY = "2";
128    String JavaDoc LOW_VISIBILITY = "3";
129    String JavaDoc MINIMAL_VISIBILITY = "4";
130
131    // Cache policies ------------------------------------------------
132
String JavaDoc CACHE_NEVER = "-1";
133    long CACHE_NEVER_LIMIT = -1;
134    String JavaDoc CACHE_ALWAYS = "0";
135    long CACHE_ALWAYS_LIMIT = 0;
136
137    // Operation impact ----------------------------------------------
138
String JavaDoc ACTION = "ACTION";
139    String JavaDoc ACTION_INFO = "ACTION_INFO";
140    String JavaDoc INFO = "INFO";
141    
142    // END of standard descriptor fields *****************************
143

144     // Default Model MBean resource type, <tt>"ObjectReference"</tt>.
145
String JavaDoc OBJECT_REF = "ObjectReference";
146
147    /**
148     * A convenience constant to use with
149     * {@link javax.management.modelmbean.ModelMBeanInfo#getDescriptors getDescriptors()}
150     * to return the descriptors of all management interface elements
151     * (a <tt>null</tt> string).
152     */

153    String JavaDoc ALL_DESCRIPTORS = null;
154
155    // Optional descriptor fields ------------------------------------
156

157    String JavaDoc LAST_RETURNED_TIME_STAMP = "lastReturnedTimestamp";
158    
159    /** used to mark the update (set) of an ATTRIBUTE_VALUE */
160    String JavaDoc LAST_UPDATED_TIME_STAMP2 = "lastUpdatedTimeStamp2";
161    
162    /** */
163    String JavaDoc INTERCEPTORS = "interceptors";
164    /**
165     * Indicates whether MBean Info should be stored.
166     */

167    String JavaDoc PERSIST_INFO = "persistmbeaninfo";
168    /**
169     * Indicates the FQN of the resource class
170     */

171    String JavaDoc RESOURCE_CLASS = "resourceClass";
172    /**
173     * constant used by the 1.0 xmbean parser
174     * this defines the name of the descriptor used to designate the persistence manager
175     * that is to be used for a given XMBean
176     */

177    String JavaDoc PERSISTENCE_MANAGER = "persistence-manager";
178
179    /**
180     * Used to store the JMX ObjectName of the MBean, so it can be referenced
181     * by subsystem that may need it
182     */

183    String JavaDoc OBJECT_NAME = "objectname";
184    
185    /**
186     * Extended descriptor used in conjuction with DelegatingPersistenceManager
187     * to specify an external MBean service that will be used as a factory
188     * for creating AttributePersistenceManager objects.
189     *
190     * If the descriptor is not specified, the ObjectName below will be used
191     * as the default.
192     */

193    String JavaDoc DELEGATING_PM_SERVICE_DESCRIPTOR = "attribute-persistence-service";
194    String JavaDoc DELEGATING_PM_SERVICE_DEFAULT_VALUE = "jboss:service=AttributePersistenceService";
195
196    /**
197     * Extended descriptor used in conjuction with DelegatingPersistenceManager
198     * to specify the operation name that will be called on the external MBean service
199     * for creating AttributePersistenceManager objects.
200     *
201     * If the descriptor is not specified, the default will apply
202     */

203    String JavaDoc DELEGATING_PM_OPERATION_DESCRIPTOR = "attribute-persistence-operation";
204    String JavaDoc DELEGATING_PM_OPERATION_DEFAULT_VALUE = "apmCreate";
205
206    /** The MBeanServer injection id type */
207    final String JavaDoc MBEAN_SERVER_INJECTION_TYPE = "MBeanServerType";
208    /** The MBeanInfo injection id type */
209    final String JavaDoc MBEAN_INFO_INJECTION_TYPE = "MBeanInfoType";
210    /** The ObjectName injection id type */
211    final String JavaDoc OBJECT_NAME_INJECTION_TYPE = "ObjectNameType";
212
213    // Constants for metadata objects --------------------------------
214
boolean IS_READABLE = true;
215    boolean IS_WRITABLE = true;
216    boolean IS_IS = true;
217 }
218
219
Popular Tags