1 23 24 29 package com.sun.enterprise.management.config; 30 31 import java.util.Map ; 32 import java.util.Set ; 33 import java.util.Collections ; 34 35 import javax.management.ObjectName ; 36 import javax.management.AttributeList ; 37 38 import com.sun.enterprise.management.support.oldconfig.OldHTTPServiceMBean; 39 40 import com.sun.appserv.management.config.HTTPProtocolConfigKeys; 41 42 43 import com.sun.appserv.management.util.misc.GSetUtil; 44 45 46 final class HTTPProtocolConfigFactory extends ConfigFactory 47 { 48 private final OldHTTPServiceMBean mOldHTTPServiceMBean; 49 50 public 51 HTTPProtocolConfigFactory( final ConfigFactoryCallback callbacks ) 52 { 53 super( callbacks ); 54 55 mOldHTTPServiceMBean = 56 getOldConfigProxies().getOldHTTPServiceMBean( getConfigName() ); 57 } 58 59 60 private final Set <String > LEGAL_OPTIONAL_KEYS = 61 GSetUtil.newUnmodifiableStringSet( 62 HTTPProtocolConfigKeys.VERSION_KEY, 63 HTTPProtocolConfigKeys.DNS_LOOKUP_ENABLED_KEY, 64 HTTPProtocolConfigKeys.FORCED_RESPONSE_TYPE_KEY, 65 HTTPProtocolConfigKeys.DEFAULT_RESPONSE_TYPE_KEY, 66 HTTPProtocolConfigKeys.SSL_ENABLED_KEY ); 67 68 protected Set <String > 69 getLegalOptionalCreateKeys() 70 { 71 return( LEGAL_OPTIONAL_KEYS ); 72 } 73 74 public ObjectName 75 create( final Map <String ,String > optional ) 76 { 77 final Map <String ,String > params = initParams( optional ); 78 79 final ObjectName amxName = createChild( params ); 80 81 return( amxName ); 82 } 83 84 protected void 85 internalRemove( final ObjectName objectName ) 86 { 87 mOldHTTPServiceMBean.removeHttpProtocol(); 88 } 89 90 protected ObjectName 91 createOldChildConfig( AttributeList attrs ) 92 { 93 return mOldHTTPServiceMBean.createHttpProtocol( attrs ); 94 } 95 } 96 97 98 99 100 | Popular Tags |