1 23 24 29 30 31 package com.sun.enterprise.management.config; 32 33 import java.util.Map ; 34 import java.util.Set ; 35 import java.util.Collections ; 36 37 import javax.management.ObjectName ; 38 import javax.management.AttributeList ; 39 40 import com.sun.enterprise.management.support.oldconfig.OldLogServiceMBean; 41 42 import com.sun.appserv.management.util.misc.GSetUtil; 43 import com.sun.appserv.management.config.ModuleLogLevelsConfigKeys; 44 45 public final class ModuleLogLevelsConfigFactory extends ConfigFactory 46 { 47 private final OldLogServiceMBean mOldLogServiceMBean; 48 49 public 50 ModuleLogLevelsConfigFactory( 51 final ConfigFactoryCallback callbacks, 52 final OldLogServiceMBean old ) 53 { 54 super( callbacks ); 55 56 mOldLogServiceMBean = old; 57 } 58 59 60 private final Set <String > LEGAL_OPTIONAL_KEYS = 61 GSetUtil.newUnmodifiableStringSet( 62 ModuleLogLevelsConfigKeys.ROOT_KEY, 63 ModuleLogLevelsConfigKeys.SERVER_KEY, 64 ModuleLogLevelsConfigKeys.EJB_CONTAINER_KEY, 65 ModuleLogLevelsConfigKeys.CMP_CONTAINER_KEY, 66 ModuleLogLevelsConfigKeys.MDB_CONTAINER_KEY, 67 ModuleLogLevelsConfigKeys.WEB_CONTAINER_KEY, 68 ModuleLogLevelsConfigKeys.CLASSLOADER_KEY, 69 ModuleLogLevelsConfigKeys.CONFIGURATION_KEY, 70 ModuleLogLevelsConfigKeys.NAMING_KEY, 71 ModuleLogLevelsConfigKeys.SECURITY_KEY, 72 ModuleLogLevelsConfigKeys.JTS_KEY, 73 ModuleLogLevelsConfigKeys.JTA_KEY, 74 ModuleLogLevelsConfigKeys.ADMIN_KEY, 75 ModuleLogLevelsConfigKeys.DEPLOYMENT_KEY, 76 ModuleLogLevelsConfigKeys.VERIFIER_KEY, 77 ModuleLogLevelsConfigKeys.JAXR_KEY, 78 ModuleLogLevelsConfigKeys.JAXRPC_KEY, 79 ModuleLogLevelsConfigKeys.SAAJ_KEY, 80 ModuleLogLevelsConfigKeys.CORBA_KEY, 81 ModuleLogLevelsConfigKeys.JAVAMAIL_KEY, 82 ModuleLogLevelsConfigKeys.JMS_KEY, 83 ModuleLogLevelsConfigKeys.CONNECTOR_KEY, 84 ModuleLogLevelsConfigKeys.JDO_KEY, 85 ModuleLogLevelsConfigKeys.CMP_KEY, 86 ModuleLogLevelsConfigKeys.UTIL_KEY, 87 ModuleLogLevelsConfigKeys.RESOURCE_ADAPTER_KEY, 88 ModuleLogLevelsConfigKeys.SYNCHRONIZATION_KEY, 89 ModuleLogLevelsConfigKeys.NODE_AGENT_KEY ); 90 91 protected Set <String > 92 getLegalOptionalCreateKeys() 93 { 94 return( LEGAL_OPTIONAL_KEYS ); 95 } 96 97 public ObjectName 98 create( Map <String ,String > optional ) 99 { 100 final Map <String ,String > params = initParams( optional ); 101 102 final ObjectName amxName = createChild( params ); 103 104 return( amxName ); 105 } 106 107 protected ObjectName 108 createOldChildConfig( String oldType, AttributeList attrs ) 109 { 110 final ObjectName old = mOldLogServiceMBean.createModuleLogLevels( attrs ); 111 return old; 112 } 113 114 protected void 115 internalRemove( final ObjectName objectName ) 116 { 117 mOldLogServiceMBean.removeModuleLogLevels(); 118 } 119 120 } 121 122 | Popular Tags |