KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > server > core > mbean > config > SslBase


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.server.core.mbean.config;
25
26 //JMX imports
27
import javax.management.*;
28
29 //Config imports
30
import com.sun.enterprise.config.ConfigException;
31 import com.sun.enterprise.config.serverbeans.ServerTags;
32 import com.sun.enterprise.config.serverbeans.ServerXPathHelper;
33
34
35 //Admin imports
36
import com.sun.enterprise.admin.common.exception.MBeanConfigException;
37 import com.sun.enterprise.admin.common.constant.ConfigAttributeName;
38
39 /**
40     This Config MBean represents a Ssl element.
41     This class is generic base for different Ssl elemenets (from OrbListener or ConnectionGroup)
42     It extends ConfigMBeanBase class which provides get/set attribute(s) and getMBeanInfo services according to text descriptions.
43 */

44 public class SslBase extends ConfigMBeanBase implements ConfigAttributeName.Ssl
45 {
46     /**
47      * MAPLIST array defines mapping between "external" name and its location in XML relatively base node
48      */

49     static final String JavaDoc[][] MAPLIST =
50     {
51         //----- SSL --------
52
{kCertNickname , ATTRIBUTE + ServerTags.CERT_NICKNAME},
53         {kSsl2Enabled , ATTRIBUTE + ServerTags.SSL2_ENABLED},
54         {kSsl2Ciphers , ATTRIBUTE + ServerTags.SSL2_CIPHERS},
55         {kSsl3Enabled , ATTRIBUTE + ServerTags.SSL3_ENABLED},
56         {kSsl3TlsCiphers , ATTRIBUTE + ServerTags.SSL3_TLS_CIPHERS},
57         {kTlsEnabled , ATTRIBUTE + ServerTags.TLS_ENABLED},
58         {kTlsRollbackEnabled , ATTRIBUTE + ServerTags.TLS_ROLLBACK_ENABLED},
59         {kClientAuthEnabled , ATTRIBUTE + ServerTags.CLIENT_AUTH_ENABLED},
60     };
61     /**
62      * ATTRIBUTES array specifies attributes descriptions in format defined for MBeanEasyConfig
63      */

64     static final String JavaDoc[] ATTRIBUTES =
65     {
66         kCertNickname +", String, RW" ,
67         kSsl2Enabled +", Boolean, RW" ,
68         kSsl2Ciphers +", String, RW" ,
69         kSsl3Enabled +", Boolean, RW" ,
70         kSsl3TlsCiphers +", String, RW" ,
71         kTlsEnabled +", Boolean, RW" ,
72         kTlsRollbackEnabled +", Boolean, RW" ,
73         kClientAuthEnabled +", Boolean, RW" ,
74     };
75     /**
76      * OPERATIONS array specifies operations descriptions in format defined for MBeanEasyConfig
77      */

78     private static final String JavaDoc[] OPERATIONS = null;
79     
80     /**
81         Default constructor sets MBean description tables
82     */

83     public SslBase() throws MBeanConfigException
84     {
85         this.setDescriptions(MAPLIST, ATTRIBUTES, OPERATIONS);
86     }
87
88 }
Popular Tags