KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > management > config > OfflineConfigDottedNamesImpl


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 package com.sun.enterprise.management.config;
24
25 import javax.management.ObjectName JavaDoc;
26
27 import com.sun.appserv.management.base.DottedNames;
28 import com.sun.appserv.management.base.XTypes;
29 import com.sun.appserv.management.config.ConfigDottedNames;
30
31 import com.sun.enterprise.management.support.DottedNamesBase;
32 import com.sun.enterprise.management.offline.OfflineDottedNamesMgr;
33
34 /**
35     Supports 'asadmin' dotted names when AMX is loaded in
36     Offline mode.
37     @see com.sun.appserv.management.config.OfflineConfigIniter
38  */

39 public final class OfflineConfigDottedNamesImpl extends DottedNamesBase
40     implements DottedNames
41 {
42     private OfflineDottedNamesMgr mMgr;
43     
44         public
45     OfflineConfigDottedNamesImpl()
46     {
47         mMgr = null;
48         throw new RuntimeException JavaDoc( "Not fully implemented" );
49     }
50     
51         protected Class JavaDoc
52     getInterface( final String JavaDoc j2eeType )
53     {
54         return ConfigDottedNames.class;
55     }
56     
57         public void
58     preRegisterDone()
59     {
60         mMgr = new OfflineDottedNamesMgr( getMBeanServer() );
61     }
62     
63         protected void
64     setupOldDottedNamesProxy()
65     {
66         mOldDottedNamesProxy = null;
67     }
68
69         protected String JavaDoc
70     deduceJ2EEType( final Class JavaDoc c)
71     {
72         return XTypes.CONFIG_DOTTED_NAMES;
73     }
74     
75         public String JavaDoc
76     getGroup()
77     {
78         return( GROUP_CONFIGURATION );
79     }
80     
81         public Object JavaDoc[]
82     dottedNameGet( final String JavaDoc[] names )
83     {
84         return mMgr.dottedNameGet( names );
85     }
86     
87         public Object JavaDoc
88     dottedNameGet( final String JavaDoc dottedName )
89     {
90         return mMgr.dottedNameGet( dottedName );
91     }
92     
93         public Object JavaDoc[]
94     dottedNameList( final String JavaDoc[] dottedNames )
95     {
96         return mMgr.dottedNameList( dottedNames );
97     }
98     
99         public Object JavaDoc[]
100     dottedNameSet( final String JavaDoc[] nameValuePairs )
101     {
102         return mMgr.dottedNameSet( nameValuePairs );
103     }
104     
105         protected boolean
106     isWriteableDottedName( String JavaDoc name )
107     {
108         return( true );
109     }
110 }
111
112
Popular Tags