Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Extending Eclipse monitoring, profiling, and testing functions
Previous Page Home Next Page

Implementing an analysis engine

The analysis engine should be an implementation of the org.eclipse.hyades.analysis.engine.IAnalysisEngine interface. To create the analysis engine component, follow these steps:

  1. In the plug-in project created in the previous section, add a Java class that implements the interface org.eclipse.hyades.analysis.engine.IAnalysisEngine. The following methods need to be implemented:
    • public boolean reloadSymptomDatabase()
      Reloads the base symptom catalog from the base XML file.

    • public boolean mergeSymptomDatabase(String symptomDbPath)
      Loads a new symptom catalog XML file denoted by the parameter path and merges any unique records with the base symptom catalog.

    • public boolean removeSymptomDatabase()
      Removes the base symptom catalog.

    • public boolean removeSymptomDatabase()
      A new symptom catalog is created denoted by the parameter XML file path. If the new symptom catalog XML file was successfully loaded, it replaces the base symptom catalog.

    • public String getSymptomDatabasePath()
      Returns the XML file path of the base symptom catalog. If no base symptom catalog XML file is loaded, null is returned.

    • public Object[] analyze(Incident incident)
      The current symptom catalog is searched for Incident matches. All Directive(s) from successful Incident matches are returned in an array structure. The implementation of public Object[] analyze(Incident incident) should look into the corresponding symptom catalog for the passed incident and return an array of matched symptoms back to the caller, i.e. the method public String analyze(Object aObject, IAnalysisMonitor aMonitor) from ILogAnalyzer or any helper method.

    • public Solution[] analyzeForSolutions(Incident incident)
      Return an array of matched solutions, that is, org.eclipse.hyades.analysis.engine.Solution, but as stated above the current design supports only EMF based symptom catalogs so it will work exclusively with org.eclipse.hyades.models.internal.sdb.SDBSolution objects, as a consequence the above mentioned method is ignored.

  2. Save the Java class in your project.

 

Related tasks
Creating an analysis engine
Implementing a log analyzer
Testing the analysis engine


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire