FileDocCategorySizeDatePackage
Diagnostics.javaAPI DocGlassfish v2 API4133Fri May 04 22:35:46 BST 2007com.sun.enterprise.server.logging.diagnostics

Diagnostics

public class Diagnostics extends Object
Diagnostics class contains list of causes, diagnostic checks and the uri to search for the latest and greatest diagnostics information based on a message id.
author
Hemanth Puttaswamy

Fields Summary
String
messageId
private ArrayList
causes
private ArrayList
checks
private String
uri
Constructors Summary
public Diagnostics(String messageId)

        this.messageId = messageId;
        causes = new ArrayList();
        checks = new ArrayList();
    
Methods Summary
public voidaddCause(java.lang.String cause)

        causes.add( cause );
    
public voidaddCheck(java.lang.String check)

        checks.add( check );
    
public java.util.ArrayListgetDiagnosticChecks()

        return checks;
    
public java.lang.StringgetMessageId()

        return messageId;
    
public java.util.ArrayListgetPossibleCauses()

        return causes;
    
public java.lang.StringgetURI()

        return uri;
    
public voidprint()
A Simple Debug print method to print the contents of this class.

        System.out.println( "---------------------------------" );
        System.out.println( "Diagnostics for MessageId = " + messageId );
        Iterator iterator = null;
        if( causes != null ) {
            iterator = causes.iterator( );
            System.out.println( "Causes --> " );
            while( iterator.hasNext( ) ) {
                System.out.println( iterator.next( ) );
            }
        }
        if( checks != null ) { 
            iterator = checks.iterator( );
            System.out.println( "Checks --> " );
            while( iterator.hasNext( ) ) {
                System.out.println( iterator.next( ) );
            }
        }
        System.out.println( "URI = " + uri );
        System.out.println( "---------------------------------" );
    
public voidsetDiagnosticChecks(java.util.ArrayList list)

        checks = list;
    
public voidsetPossibleCauses(java.util.ArrayList list)

        causes = list;
    
public voidsetURI(java.lang.String uri)

        this.uri = uri;