Methods Summary |
---|
public com.sun.enterprise.management.support.AMXDebugStuff | asAMXDebugStuff(com.sun.appserv.management.base.AMX amx)
final String[] attrNames = Util.getExtra( amx ).getAttributeNames();
AMXDebugStuff result = null;
if ( GSetUtil.newUnmodifiableStringSet( attrNames ).contains( "AMXDebug" ) )
{
final ProxyFactory factory = Util.getExtra( amx ).getProxyFactory();
try
{
final Class amxClass =
ClassUtil.getClassFromName( Util.getExtra( amx ).getInterfaceName() );
final Class[] interfaces = new Class[] { amxClass, AMXDebugStuff.class };
final ObjectName objectName = Util.getObjectName( amx );
return (AMXDebugStuff)
factory.newProxyInstance( objectName, interfaces );
}
catch( Exception e )
{
trace( ExceptionUtil.toString( e ) );
throw new RuntimeException( e );
}
}
return result;
|
public java.util.Set | findRegisteredJ2EETypes()
return getJ2EETypes( mDomainRoot.getQueryMgr().queryAllSet() );
|
public java.util.SortedSet | getAllAMX()
final SortedSet<ObjectName> all = getAllObjectNames();
final SortedSet<AMX> allAMX = new TreeSet<AMX>( new AMXComparator<AMX>() );
final ProxyFactory proxyFactory = Util.getExtra( mDomainRoot ).getProxyFactory();
for( final ObjectName objectName : all )
{
try
{
final AMX amx = proxyFactory.getProxy( objectName, AMX.class );
allAMX.add( amx );
}
catch( Exception e )
{
trace( ExceptionUtil.toString( e ) );
}
}
return allAMX;
|
public java.util.SortedSet | getAllAMX(java.lang.Class theInterface)
final SortedSet<AMX> all = getAllAMX();
final TreeSet<AMX> allOfInterface = new TreeSet<AMX>( new AMXComparator<AMX>() );
for( final AMX amx : all )
{
if ( theInterface.isAssignableFrom( amx.getClass() ) )
{
allOfInterface.add( amx );
}
}
return TypeCast.asSortedSet( allOfInterface );
|
public javax.management.ObjectName[] | getAllAMXArray()
final SortedSet<ObjectName> s = getAllObjectNames();
final ObjectName[] objectNames = new ObjectName[ s.size() ];
s.toArray( objectNames );
return( objectNames );
|
public java.util.SortedSet | getAllObjectNames()As an optimization to speed up testing, we always get the Set of AMX
ObjectNames using Observer, which maintains such a list.
final Set<ObjectName> s =
Observer.getInstance().getCurrentlyRegisteredAMX();
return newSortedSet( s );
|
public java.util.Set | getAvailJ2EETypes()
final SortedSet<ObjectName> allObjectNames = getAllObjectNames();
final Set<String> j2eeTypes = new HashSet<String>();
for( final ObjectName objectName : allObjectNames )
{
final String value = Util.getJ2EEType( objectName );
j2eeTypes.add( value );
}
return( j2eeTypes );
|
public java.util.Set | getJ2EETypes(java.util.Set amxs)
final Set<String> registered = new HashSet<String>();
for( final AMX amx : amxs )
{
registered.add( amx.getJ2EEType() );
}
return registered;
|
public static java.util.SortedSet | newSortedSet(javax.management.ObjectName[] objectNames)
final SortedSet<ObjectName> s = new TreeSet<ObjectName>( ObjectNameComparator.INSTANCE );
for( final ObjectName objectName : objectNames )
{
s.add( objectName );
}
return s;
|
public static java.util.SortedSet | newSortedSet(java.util.Collection c)
final ObjectName[] objectNames = new ObjectName[ c.size() ];
c.toArray( objectNames );
return newSortedSet( objectNames );
|
public java.lang.String | setToSortedString(java.util.Set s, java.lang.String delim)
final String[] a = GSetUtil.toStringArray( s );
Arrays.sort( a );
return StringUtil.toString( NEWLINE, (Object[])a );
|
private void | trace(java.lang.Object o)
System.out.println( "" + o );
|