TPTP 4.0.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter
Class AdapterPlugin

java.lang.Object
  extended byorg.eclipse.core.runtime.Plugin
      extended byorg.eclipse.hyades.logging.adapter.AdapterPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class AdapterPlugin
extends org.eclipse.core.runtime.Plugin

This class contains various operations that allows the Generic Log Adapter to run within Eclipse. This class is where all of the workbench interaction should be placed. Anyone who uses either the class object or instances of this class must code in such a manner as to handle linkage/resolution problems at runtime. This is because the Eclipse runtime is not nessesary to run the Generic Log Adapter.


Field Summary
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
AdapterPlugin()
           
 
Method Summary
static IComponent getComponent(java.lang.String classname)
          Get the component instance for the specified class name
static java.util.List getContextListeners()
          Locate all of the IContextListeners that have registered via the extension point.
static AdapterPlugin getPlugin()
          Get the plugin instance.
static java.util.ResourceBundle getResourceBundle()
          Get the resource bundle for this plugin.
static ISubstitutionExtension getSubstitutionExtension(java.lang.String classname)
          Get a substitution extension class instance for the specified class name
 void start(org.osgi.framework.BundleContext context)
          This method is called upon plug-in activation
 void stop(org.osgi.framework.BundleContext context)
          This method is called when the plug-in is stopped
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdapterPlugin

public AdapterPlugin()
Method Detail

getPlugin

public static AdapterPlugin getPlugin()
Get the plugin instance.

Returns:
AdapterPlugin instance

getResourceBundle

public static java.util.ResourceBundle getResourceBundle()
Get the resource bundle for this plugin.

Returns:
ResoureBundle for this plugin

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
This method is called upon plug-in activation

Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
This method is called when the plug-in is stopped

Throws:
java.lang.Exception

getContextListeners

public static java.util.List getContextListeners()
                                          throws AdapterException
Locate all of the IContextListeners that have registered via the extension point.

Returns:
a java.util.List containing the IContextListener instances.
Throws:
AdapterException

getComponent

public static IComponent getComponent(java.lang.String classname)
                               throws AdapterException
Get the component instance for the specified class name

Parameters:
classname - of the component
Returns:
the component instance with the specified class name
Throws:
AdapterException

getSubstitutionExtension

public static ISubstitutionExtension getSubstitutionExtension(java.lang.String classname)
                                                       throws java.lang.ClassCastException,
                                                              AdapterException
Get a substitution extension class instance for the specified class name

Parameters:
classname - of the substitution extension class
Returns:
a substitution extension class instance with the specified class name
Throws:
AdapterException
java.lang.ClassCastException

TPTP 4.0.0 Monitoring Tools Project
Public API Specification