KickJava   Java API By Example, From Geeks To Geeks.

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


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
25 package com.sun.enterprise.management.config;
26
27 import java.util.Map JavaDoc;
28 import java.util.Set JavaDoc;
29 import java.util.Collections JavaDoc;
30
31 import javax.management.ObjectName JavaDoc;
32 import javax.management.AttributeList JavaDoc;
33
34 import com.sun.appserv.management.base.XTypes;
35 import com.sun.enterprise.management.support.oldconfig.OldAvailabilityServiceMBean;
36
37 /**
38  */

39 public final class JMSAvailabilityConfigFactory extends ConfigFactory
40 {
41     private final OldAvailabilityServiceMBean mOldAvailabilityService;
42     
43         public
44     JMSAvailabilityConfigFactory(final ConfigFactoryCallback callbacks )
45     {
46         super( callbacks );
47         
48         mOldAvailabilityService =
49             getOldConfigProxies().getOldAvailabilityServiceMBean( getConfigName() );
50     }
51
52     
53     /**
54      */

55         public ObjectName JavaDoc
56     create( boolean availabilityEnabled, String JavaDoc mqStorePoolName )
57     {
58         final String JavaDoc[] requiredParams =
59         {
60             "availability-enabled", "" + availabilityEnabled,
61             "mq-store-pool-name", mqStorePoolName,
62         };
63         
64         final Map JavaDoc<String JavaDoc,String JavaDoc> params = initParams( requiredParams, null );
65
66         final ObjectName JavaDoc amxName = createChild( null );
67         
68         return( null );
69     }
70     
71
72         protected ObjectName JavaDoc
73     createOldChildConfig( final AttributeList JavaDoc attrs )
74     {
75         final ObjectName JavaDoc oldObjectName =
76             mOldAvailabilityService.createJmsAvailability( attrs );
77
78         return oldObjectName;
79     }
80     
81         protected void
82     internalRemove( final ObjectName JavaDoc objectName )
83     {
84         mOldAvailabilityService.removeJmsAvailability();
85     }
86 }
87
88
Popular Tags