Methods Summary |
---|
private com.sun.appserv.management.base.AMXDebug | getAMXDebug()
return AMXDebug.getInstance();
|
private java.lang.String | getID(java.lang.String uniquifier)
return this.getClass().getName() + "." + uniquifier;
|
private com.sun.appserv.management.util.misc.Output | getOutput(java.lang.String id)
return getAMXDebug().getOutput( id );
|
public synchronized void | testClose()
final String id = getID( "testClose" );
final Output output = getOutput( id );
final File outputFile = getAMXDebug().getOutputFile( id );
output.println( "hello" );
assert( outputFile.exists() );
output.close();
outputFile.delete();
assert( !outputFile.exists() );
output.println( "hello" );
assert( outputFile.exists() );
|
public synchronized void | testCreateFile()
// multiple iterations require that we choose a new file each time
final String id = getID( "testCreateFile" + System.currentTimeMillis() );
final Output output = getOutput( id );
final File outputFile = getAMXDebug().getOutputFile( id );
outputFile.delete();
assert( ! outputFile.exists() );
output.printDebug( "test" );
assert( outputFile.exists() );
|
public synchronized void | testMark()
final String id = getID( "testMark" );
final Output output = getOutput( id );
getAMXDebug().mark( id );
getAMXDebug().mark( id, null );
getAMXDebug().mark( id, "marker 1" );
getAMXDebug().mark( id, "marker 2" );
getAMXDebug().mark( output, null );
getAMXDebug().mark( output, "marker 3" );
|
public synchronized void | testPrint()
final String id = getID( "testPrint" );
final Output output = getOutput( id );
output.printDebug( "printDebug" );
output.printError( "printError" );
output.println( "println" );
output.print( "print" );output.print( "..." );output.print( "END" );
|
public synchronized void | testReset()
final String id = getID( "testReset" );
final Output output = getOutput( id );
getAMXDebug().reset( id );
final File outputFile = getAMXDebug().getOutputFile( id );
outputFile.delete();
assert( ! outputFile.exists() );
output.printDebug( "test" );
assert( outputFile.exists() );
// make sure we can call it repeatedly
getAMXDebug().reset( id );
getAMXDebug().reset( id );
getAMXDebug().reset( id );
|
public synchronized void | testSetAll()
final String id = getID( "testSetAll" );
final Output output = getOutput( id );
getAMXDebug().setAll( false );
getAMXDebug().setAll( false );
getAMXDebug().setAll( true );
getAMXDebug().setAll( true );
getAMXDebug().setAll( false );
getAMXDebug().setAll( true );
getAMXDebug().setAll( true );
|
public synchronized void | testToggleDebug()
final String id = getID( "testToggleDebug" );
final Output output = getOutput( id );
getAMXDebug().setDebug( id, false );
assert( ! getAMXDebug().getDebug( id ) );
getAMXDebug().setDebug( id, true );
assert( getAMXDebug().getDebug( id ) );
|
public synchronized void | testToggleDefaultDebug()
final String id = getID( "testToggleDefaultDebug" );
final Output output = getOutput( id );
getAMXDebug().setDefaultDebug( false );
assert( ! getAMXDebug().getDefaultDebug() );
getAMXDebug().setDefaultDebug( true );
assert( getAMXDebug().getDefaultDebug() );
|