Methods Summary |
---|
private javax.management.ObjectName | ON(java.lang.String objectNameString)
return Util.newObjectName( objectNameString );
|
private java.lang.String | getPrefix(java.lang.String objectNameString)
return getPrefix( ON( objectNameString ) );
|
private java.lang.String | getPrefix(javax.management.ObjectName objectName)
final OfflineDottedNamePrefixes prefixes =
OfflineDottedNamePrefixes.getInstance();
return prefixes.getPrefix( objectName );
|
public void | testAllAMXConfig()
if ( getConnection() == null )
{
warning( "testAllAMXConfig: No MBeanServerConnection, skipping test" );
return;
}
final Set<ConfigElement> all = getTestUtil().getAllAMX( ConfigElement.class );
final Set<String> missing = new HashSet<String>();
for( final ConfigElement config : all )
{
final ObjectName objectName = Util.getObjectName( config );
final String prefix = getPrefix( objectName );
if ( prefix == null )
{
missing.add( config.getJ2EEType() );
}
else
{
//trace( prefix );
}
}
if ( missing.size() != 0 )
{
//warning( "The following j2eeTypes do not yet have prefix support: " + NEWLINE +
//CollectionUtil.toString( missing, NEWLINE ) );
}
|
public void | testGetInstance()
assert OfflineDottedNamePrefixes.getInstance() != null;
|
public void | testGetPrefix()
assert( getPrefix( DOMAIN ).equals( "domain" ) );
assert( getPrefix( SERVER_CONFIG ).equals( "server-config" ) );
|
public void | testIllegal()
try
{
assert( getPrefix( "amx:foo=bar" ) == null );
assert false;
}
catch( Exception e )
{
}
|