View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.jdiagnose;
17  
18  /***
19   * This is the primary interface for JDiagnose. Classes that implement this interface
20   * are expected to have a name and possibly some children. Once the diagnose method
21   * is called, the Diagnostic should notify listeners of the progress or the diagnosis.
22   * 
23   * User: jamie
24   * Date: May 29, 2004
25   * Time: 10:19:56 PM
26   */
27  public interface Diagnostic {
28  
29      /***
30       * Returns the name of the diagnostic. Should be a Fully Qualified Name, usually 
31       * defaults to the classname (and method name in the case of the DiagnosticUnit)
32       * 
33       * @return the name of the diagnostic
34       */
35      String getName();
36  
37      /***
38       * Run this diagnostic.
39       * @throws DiagnosticException if the diagnostic failed 
40       */
41      void diagnose() throws DiagnosticException;
42  
43  }