Methods Summary |
---|
protected final com.sun.appserv.management.config.VirtualServerConfig | create(java.lang.String name)
return (VirtualServerConfig)createProgeny( name, null );
|
protected final com.sun.appserv.management.config.AMXConfig | createProgeny(java.lang.String name, java.util.Map extra)
final Map<String,String> allOptions = MapUtil.newMap( extra, getOptional() );
return( getHTTPService().createVirtualServerConfig( name, "localhost", allOptions ) );
|
protected final com.sun.appserv.management.config.HTTPServiceConfig | getHTTPService()
return getConfigConfig().getHTTPServiceConfig();
|
private java.util.Map | getOptional()
final Map<String,String> m = new HashMap<String,String>();
m.put( VirtualServerConfigKeys.STATE_KEY, VirtualServerConfigKeys.STATE_DISABLED );
m.put( VirtualServerConfigKeys.DOC_ROOT_PROPERTY_KEY, "/" );
m.put( VirtualServerConfigKeys.ACCESS_LOG_PROPERTY_KEY, "/" );
return m;
|
protected com.sun.appserv.management.base.Container | getProgenyContainer()
return getHTTPService();
|
protected java.lang.String | getProgenyJ2EEType()
return XTypes.VIRTUAL_SERVER_CONFIG;
|
protected void | removeProgeny(java.lang.String name)
getHTTPService().removeVirtualServerConfig( name );
|
public void | testCreateHTTPAccessLog()
if ( ! checkNotOffline( "testCreateRemove" ) )
{
return;
}
final String NAME = "VirtualServerConfigMgrTest-testCreateHTTPAccessLog";
try
{
removeEx( NAME );
final VirtualServerConfig newVS =
(VirtualServerConfig)createProgeny( NAME, null);
assert newVS != null;
//trace( "newVS.getState: " + newVS.getState() );
// assert newVS.getState().equals("disabled");
assert( newVS.getHTTPAccessLogConfig() == null );
final HTTPAccessLogConfig accessLog =
newVS.createHTTPAccessLogConfig( false, "${com.sun.aas.instanceRoot}/logs/access", null);
assert ( accessLog != null );
assert ( Util.getObjectName( accessLog ).equals( Util.getObjectName( newVS.getHTTPAccessLogConfig() ) ) );
newVS.removeHTTPAccessLogConfig();
}
finally
{
remove( NAME );
}
|