KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > management > ObjectNameBuilder


1 // Copyright 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind.management;
16
17 import java.util.Hashtable JavaDoc;
18
19 import javax.management.ObjectName JavaDoc;
20
21 import org.apache.hivemind.internal.ServicePoint;
22 import org.apache.hivemind.management.impl.ObjectNameBuilderImpl;
23
24 /**
25  * Service for naming JMX MBeans Each service that is exported as MBean must have a unique
26  * ObjectName This service guarantees that the ObjectNames are built in a consistent manner The
27  * concrete naming scheme depends on the implementation of this interface. Default implementation is
28  * {@link ObjectNameBuilderImpl}
29  *
30  * @author Achim Huegen
31  * @since 1.1
32  */

33 public interface ObjectNameBuilder
34 {
35     /**
36      * Creates an ObjectName from list of keys and values and prepends the domain. Maintains the
37      * order of the keys and this distinguishes the method from the ObjectName constructor that
38      * accepts an hashtable of keys and values. The order influences the visualization in JConsole.
39      * Example: Hivemind:key1=value1,key2=value2
40      *
41      * @see ObjectName#getInstance(String, Hashtable)
42      */

43     public ObjectName JavaDoc createObjectName(String JavaDoc[] keys, String JavaDoc[] values);
44
45     public ObjectName JavaDoc createObjectName(String JavaDoc moduleId, String JavaDoc id, String JavaDoc type);
46
47     public ObjectName JavaDoc createObjectName(String JavaDoc qualifiedId, String JavaDoc type);
48
49     public ObjectName JavaDoc createServiceObjectName(ServicePoint servicePoint);
50
51     public ObjectName JavaDoc createServiceDecoratorName(ServicePoint servicePoint, String JavaDoc decoratorType);
52
53 }
Popular Tags