Methods Summary |
---|
java.util.Set | _getConfigNames()
// we can't use a proxy; it won't work when the method name starts with "get", apparently
// thinking it's an Attribute
final ObjectName [] configObjectNames =
(ObjectName [])mConn.invoke( getConfigsObjectName(), "getConfig", null, null );
final HashSet configNames = new HashSet();
for( int i = 0; i < configObjectNames.length; ++i )
{
final String name = (String)mConn.getAttribute( configObjectNames[ i ], "name" );
configNames.add( name );
}
return( configNames );
|
protected java.util.Set | _getServerNames()
final MyController controller = (MyController)
MBeanServerInvocationHandler.newProxyInstance( mConn, getControllerObjectName(), MyController.class, false );
final String [] names = controller.listServerInstances();
return( ArrayConversion.toSet( names ) );
|
public java.lang.String | getConfigNameForServer(java.lang.String serverName)
final ObjectName serverObjectName = getServerObjectName( serverName );
if ( serverObjectName == null )
{
throw new DottedNameServerInfo.UnavailableException( serverName );
}
String configName = null;
try
{
configName = (String)mConn.getAttribute( serverObjectName, "config_ref" );
}
catch( Exception e )
{
throw new DottedNameServerInfo.UnavailableException( e );
}
return( configName );
|
public java.util.Set | getConfigNames()
Set namesSet = null;
try
{
namesSet = _getConfigNames();
}
catch( Exception e )
{
throw new DottedNameServerInfo.UnavailableException( e );
}
return( namesSet );
|
javax.management.ObjectName | getConfigsObjectName()
return( new ObjectName( "com.sun.appserv:type=configs,category=config" ) );
|
javax.management.ObjectName | getControllerObjectName()
return( ObjectNames.getControllerObjectName() );
|
public java.util.Set | getServerNames()
Set namesSet = null;
try
{
namesSet = _getServerNames();
}
catch( Exception e )
{
throw new DottedNameServerInfo.UnavailableException( e );
}
return( namesSet );
|
public java.lang.String[] | getServerNamesForConfig(java.lang.String configName)
final java.util.Iterator iter = getServerNames().iterator();
final java.util.ArrayList namesOut = new java.util.ArrayList();
while ( iter.hasNext() )
{
final String serverName = (String)iter.next();
if ( configName.equals( getConfigNameForServer( serverName ) ) )
{
namesOut.add( serverName );
}
}
final String [] namesOutArray = new String [ namesOut.size() ];
namesOut.toArray( namesOutArray );
return( namesOutArray );
|
javax.management.ObjectName | getServerObjectName(java.lang.String serverName)
return( ObjectNames.getServerObjectName( serverName ) );
|