FileDocCategorySizeDatePackage
AMXDebugSupport.javaAPI DocGlassfish v2 API4512Fri May 04 22:23:40 BST 2007com.sun.enterprise.management.support

AMXDebugSupport

public final class AMXDebugSupport extends Object implements AMXDebugSupportMBean

Fields Summary
private final MBeanServer
mServer
public static final String
NAME
Constructors Summary
public AMXDebugSupport(MBeanServer server)

    
        
        
    
        mServer = server;
        
        final String    domain  =
            BootUtil.getInstance().getAMXSupportJMXDomain();
        
        final String    props   = Util.makeNameProp( NAME);
        
        final ObjectName    objectName  = Util.newObjectName( domain, props );
        try
        {
            mServer.registerMBean( this, objectName );
        }
        catch( Exception e )
        {
            throw new RuntimeException( e );
        }
    
Methods Summary
public voidcleanup()

        getAMXDebug().cleanup();
    
private com.sun.appserv.management.base.AMXDebuggetAMXDebug()

        return AMXDebug.getInstance();
    
public booleangetDebug(java.lang.String id)

        return getAMXDebug().getDebug( id );
    
public booleangetDefaultDebug()

        return getAMXDebug().getDefaultDebug();
    
public java.lang.StringgetOutputFrom(java.lang.String id)

        String  output  = "";
        
        final File  f   = getAMXDebug().getOutputFile( id );
        if ( f != null && f.exists() )
        {
            try
            {
                output  = FileUtils.fileToString( f );
            }
            catch( Exception e )
            {
                output  = "";
            }
        }
        
        return output;
    
public java.lang.String[]getOutputIDs()

        return AMXDebug.getInstance().getOutputIDs();
    
public voidsetAll(boolean debug)

        getAMXDebug().setAll( debug );
    
public voidsetDebug(java.lang.String id, boolean debug)

        getAMXDebug().setDebug( id, debug );
    
public voidsetDefaultDebug(boolean debug)

        getAMXDebug().setDefaultDebug( debug );