FileDocCategorySizeDatePackage
HTTPListenerConfigFactory.javaAPI DocGlassfish v2 API5274Fri May 04 22:23:18 BST 2007com.sun.enterprise.management.config

HTTPListenerConfigFactory

public final class HTTPListenerConfigFactory extends ConfigFactory

Fields Summary
private final com.sun.enterprise.management.support.oldconfig.OldHTTPServiceMBean
mOldHTTPServiceMBean
private final Set
LEGAL_OPTIONAL_KEYS
Constructors Summary
public HTTPListenerConfigFactory(ConfigFactoryCallback callbacks)

		super( callbacks );
		
		mOldHTTPServiceMBean =
			getOldConfigProxies().getOldHTTPServiceMBean( getConfigName() );
	
Methods Summary
private voidcheckVirtualServerExists(java.lang.String virtualServerName)

		final HTTPServiceConfig		httpService	= (HTTPServiceConfig)getFactoryContainer();
		
		final Map<String,VirtualServerConfig>	virtualServers	=
		    httpService.getVirtualServerConfigMap();
		
		if( ! virtualServers.containsKey( virtualServerName ) )
		{
			throw new IllegalArgumentException( "No virtual server exists with the name: " + virtualServerName );
		}
	
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String address, int port, java.lang.String defaultVirtualServer, java.lang.String serverName, java.util.Map options)

		final String[] requiredParams =
		{
		    HTTPListenerConfigKeys.ADDRESS_KEY,				address,
		    HTTPListenerConfigKeys.PORT_KEY,					"" + port,
			HTTPListenerConfigKeys.DEFAULT_VIRTUAL_SERVER_KEY, defaultVirtualServer,
			HTTPListenerConfigKeys.SERVER_NAME_KEY,			serverName,
		};
		
		if ( requireValidReferences( options )  )
		{
			checkVirtualServerExists( defaultVirtualServer );
		}

		final Map<String,String> params	= initParams( name, requiredParams, options );

		final ObjectName	amxName	= createNamedChild( name, params );
		
		return( amxName );
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs)

		return mOldHTTPServiceMBean.createHttpListener( translatedAttrs );
	
protected java.util.SetgetLegalOptionalCreateKeys()

	
	     
	
	
		return( LEGAL_OPTIONAL_KEYS );
	
protected java.util.MapgetParamNameOverrides()

		return( MapUtil.newMap( CONFIG_NAME_KEY, "id" ) );
	
protected final voidremoveByName(java.lang.String name)

		mOldHTTPServiceMBean.removeHttpListenerById( name );