KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > common > constant > AdminConstants


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.admin.common.constant;
25
26 import com.sun.enterprise.admin.util.HostAndPort;
27
28 // i18n import
29
import com.sun.enterprise.admin.util.SOMLocalStringsManager;
30
31 /**
32  */

33 public final class AdminConstants
34 {
35     public static final String JavaDoc kAdminServletURI = "web1/entry";
36     public static final String JavaDoc kHttpPrefix = "http://";
37   public static final String JavaDoc kHttpsPrefix = "https://";
38     public static final int kTypeWebModule = 0;
39     public static final int kTypeEjbModule = 1;
40
41     public static final int kDebugMode = 0;
42     public static final int kNonDebugMode = 1;
43
44     public static final String JavaDoc CLIENT_VERSION = "clientVersion";
45     public static final String JavaDoc OBJECT_NAME = "objectName";
46     public static final String JavaDoc OPERATION_NAME = "operationName";
47     public static final String JavaDoc OPERATION_SIGNATURE = "signature";
48     public static final String JavaDoc OPERATION_PARAMS = "params";
49     public static final String JavaDoc EXCEPTION = "exception";
50     public static final String JavaDoc RETURN_VALUE = "returnValue";
51     public static final String JavaDoc ATTRIBUTE_NAME = "attributeName";
52     public static final String JavaDoc ATTRIBUTE = "jmxAttribute";
53     public static final String JavaDoc ATTRIBUTE_LIST = "jmxAttributeList";
54     public static final String JavaDoc ATTRIBUTE_NAMES = "attributeNames";
55     public static final String JavaDoc CLIENT_JAR = "Client.jar";
56     
57     /** The name of the admin logger as registered in the LogDomains. */
58     /* The reason to hardcode this here is that LogDomains class may
59      * not be available for SOM or other parts of admin framework.
60      * Make sure that the string is same as that in LogDomains.java.
61     */

62     public static final String JavaDoc kLoggerName =
63             "javax.enterprise.system.tools.admin";
64
65     // i18n SOMLocalStringsManager
66
private static SOMLocalStringsManager localizedStrMgr =
67         SOMLocalStringsManager.getManager( AdminConstants.class );
68
69     /* Some additional values for 8.0 PE */
70
71     public static final String JavaDoc DOMAIN_ADMIN_GROUP_NAME = "asadmin";
72     /* This should the same as the value of <group-name> in
73     com/sun/enterprise/admin/server/core/servlet/sun-web.xml */

74
75     public static String JavaDoc getProtocolString(HostAndPort hp)
76     {
77         if (hp == null)
78         {
79             String JavaDoc msg = localizedStrMgr.getString( "admin.common.null_host_port" );
80             throw new IllegalArgumentException JavaDoc( msg );
81         }
82         return ( (hp.isSecure() ? kHttpsPrefix : kHttpPrefix) + hp.toString() );
83     }
84 }
85
Popular Tags