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.util.misc.GSetUtil; 41 42 import com.sun.appserv.management.config.RequestProcessingConfigKeys; 43 44 45 final class RequestProcessingConfigFactory extends ConfigFactory 46 { 47 private final OldHTTPServiceMBean mOldHTTPServiceMBean; 48 49 public 50 RequestProcessingConfigFactory( final ConfigFactoryCallback callbacks ) 51 { 52 super( callbacks ); 53 54 mOldHTTPServiceMBean = 55 getOldConfigProxies().getOldHTTPServiceMBean( getConfigName() ); 56 } 57 58 private final Set <String > LEGAL_OPTIONAL_KEYS = 59 GSetUtil.newUnmodifiableStringSet( 60 RequestProcessingConfigKeys.THREAD_COUNT_KEY, 61 RequestProcessingConfigKeys.INITIAL_THREAD_COUNT_KEY, 62 RequestProcessingConfigKeys.THREAD_INCREMENT_KEY, 63 RequestProcessingConfigKeys.REQUEST_TIMEOUT_IN_SECONDS_KEY, 64 RequestProcessingConfigKeys.HEADER_BUFFER_LENGTH_IN_BYTES_KEY ); 65 66 67 protected Set <String > 68 getLegalOptionalCreateKeys() 69 { 70 return( LEGAL_OPTIONAL_KEYS ); 71 } 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.removeRequestProcessing(); 88 } 89 protected ObjectName 90 createOldChildConfig( AttributeList attrs ) 91 { 92 return mOldHTTPServiceMBean.createRequestProcessing( attrs ); 93 } 94 } 95 96 97 98 99 | Popular Tags |