FileDocCategorySizeDatePackage
VirtualServerConfigFactory.javaAPI DocGlassfish v2 API5546Fri May 04 22:23:20 BST 2007com.sun.enterprise.management.config

VirtualServerConfigFactory

public final class VirtualServerConfigFactory extends ConfigFactory

Fields Summary
private final Set
LEGAL_OPTIONAL_KEYS
public static final String
HOSTS_KEY
Constructors Summary
public VirtualServerConfigFactory(ConfigFactoryCallback callbacks)

param
callbacks ObjectName of the config to which this HTTPServiceConfigMBean belongs

		super( callbacks );
	
Methods Summary
public javax.management.ObjectNamecreate(java.lang.String name, java.lang.String hosts, java.util.Map optional)
Parameters:
  • CONFIG_NAME_KEY
  • HOSTS_KEY
  • HTTP_LISTENERS_KEY
  • DEFAULT_WEB_MODULE_KEY
  • STATE_KEY
  • LOG_FILE_KEY
  • DOC_ROOT_KEY
  • ACCESS_LOG_KEY

	
																										 
		 
	
		 	
		 	
		 		 
	
        final String[] requiredParams = new String[]
		{
			HOSTS_KEY,			hosts,
		};
		
		// special prefix
		if ( ! WebModuleSupport.isLegalVirtualServerName( name ) )
		{
			throw new IllegalArgumentException( name );
		}
		
		final Map<String,String> params	= initParams( name, requiredParams, optional );
		
		final ObjectName	amxName	= createNamedChild( name, params );
		
		return( amxName );
	
protected javax.management.ObjectNamecreateOldChildConfig(javax.management.AttributeList translatedAttrs, java.util.Properties props)
The caller is responsible for dealing with any Properties.

        final String target = getConfigName();

		final OldConfigsMBean	oldConfigsMBean =
			getOldConfigProxies().getOldConfigsMBean();
		
		trace( "VirtualServerConfigFactory.createOldChildConfig: creating using: " +
			stringify( translatedAttrs ) );
			
		final ObjectName	objectName	=
				oldConfigsMBean.createVirtualServer( translatedAttrs, props, target );
		
		return( objectName );
	
protected java.util.SetgetLegalOptionalCreateKeys()

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

		return( MapUtil.newMap( CONFIG_NAME_KEY, "id" ) );
	
public voidinternalRemove(javax.management.ObjectName objectName)

         // now - obtain Old HTTPService proxy
         final OldHTTPServiceMBean oldHTTPServer =
         	getOldConfigProxies().getOldHTTPServiceMBean( getConfigName() );
         	
         // and ask it to remove VirtualServer
         final String	name	= Util.getName( objectName );
         oldHTTPServer.removeVirtualServerById( name );