KickJava   Java API By Example, From Geeks To Geeks.

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


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.Map JavaDoc;
18
19 import javax.management.JMException JavaDoc;
20 import javax.management.ObjectName JavaDoc;
21
22 import org.apache.hivemind.InterceptorStack;
23 import org.apache.hivemind.impl.MessageFormatter;
24
25 /**
26  * Messages for the management package.
27  *
28  * @author Achim Huegen
29  * @since 1.1
30  */

31 public class ManagementMessages
32 {
33     protected static MessageFormatter _formatter = new MessageFormatter(ManagementMessages.class);
34
35     public static String JavaDoc errorInstantiatingPerformanceInterceptor(String JavaDoc serviceId,
36             InterceptorStack stack, Throwable JavaDoc cause)
37     {
38         return _formatter.format("error-instantiating-performance-interceptor", new Object JavaDoc[]
39         { serviceId, stack.getServiceInterface().getName(), stack.getServiceExtensionPointId(),
40                 cause });
41     }
42
43     public static String JavaDoc errorInstantiatingConnectorServer(String JavaDoc jmxServiceURL, Map JavaDoc env,
44             Throwable JavaDoc cause)
45     {
46         return _formatter.format("error-instantiating-connector-server", new Object JavaDoc[]
47         { jmxServiceURL, cause });
48     }
49
50     public static String JavaDoc errorRegisteringMBean(ObjectName JavaDoc objectName, JMException JavaDoc cause)
51     {
52         return _formatter.format("error-registering-mbean", new Object JavaDoc[]
53         { objectName, cause });
54     }
55
56     public static String JavaDoc errorUnregisteringMBean(ObjectName JavaDoc objectName, JMException JavaDoc cause)
57     {
58         return _formatter.format("error-unregistering-mbean", new Object JavaDoc[]
59         { objectName, cause.getMessage() });
60     }
61
62     public static String JavaDoc errorStartMethodFailed(String JavaDoc startMethod, ObjectName JavaDoc objectName,
63             Throwable JavaDoc cause)
64     {
65         return _formatter.format("error-start-method-failed", new Object JavaDoc[]
66         { startMethod, objectName, cause });
67     }
68 }
Popular Tags