TPTP 4.0.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter
Class Adapter

java.lang.Object
  extended byorg.eclipse.hyades.logging.adapter.Adapter

public class Adapter
extends java.lang.Object

Adapter is a simple main entry point to run an adapter controller.


Constructor Summary
Adapter()
           
 
Method Summary
 IStatus getStatus()
          Gets the status of the adapter instance.
 void hardStop()
          Stops all of the adapter contexts.
static void main(java.lang.String[] args)
          Adapter main method to run the adapter as a standalone program.
 void setComponentConfigPath(java.lang.String configFilePath)
          Sets the file path of the component configuration portion of the adapter configuration.
 void setContextConfigPath(java.lang.String configFilePath)
          Sets the file path of the context configuration portion of the adapter configuration.
 void setLogOutputter(IOutputter outputter)
          Set the Adapter log outputter for GLA messages
 void start(boolean separateThread, boolean daemon)
          Starts the generic log adapter with the default configuration file SimpleComponentConfigurations.xml unless the configuration files were specified with setContextConfigPath and setComponentConfigPath methods.
 void stop()
          Stops all of the adapter contexts.
 void validate()
          Setup the adapter and validate the configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Adapter

public Adapter()
Method Detail

setContextConfigPath

public void setContextConfigPath(java.lang.String configFilePath)
Sets the file path of the context configuration portion of the adapter configuration. This method must be called before the start method in order for the configuration to be used.

Parameters:
configFilePath - The file path of the context configuration

setComponentConfigPath

public void setComponentConfigPath(java.lang.String configFilePath)
Sets the file path of the component configuration portion of the adapter configuration. This method must be called before the start method in order for the configuration to be used.

Parameters:
configFilePath - The file path of the component configuration

validate

public void validate()
              throws AdapterException
Setup the adapter and validate the configuration file. This method will not run the adapter and stops after validation.

Throws:
AdapterException - if the configuration is invalid

start

public void start(boolean separateThread,
                  boolean daemon)
           throws AdapterException
Starts the generic log adapter with the default configuration file SimpleComponentConfigurations.xml unless the configuration files were specified with setContextConfigPath and setComponentConfigPath methods.

Parameters:
separateThread - Run the adapter in a separate thread
daemon - Run the adapter as a daemon thread.
Throws:
AdapterException - If an error occurs during execution.

stop

public void stop()
Stops all of the adapter contexts. Note any data still being processed by the contexts will be flushed to the last component of each context.


hardStop

public void hardStop()
Stops all of the adapter contexts. This stop method will still cause the contexts to be flushed but will not call the context listener methods during flushing.


main

public static void main(java.lang.String[] args)
Adapter main method to run the adapter as a standalone program.

Parameters:
args - -cc contextConfigurationPath -ac componentConfigurationPath

getStatus

public IStatus getStatus()
Gets the status of the adapter instance.

Returns:
the org.eclipse.hyades.logging.adapter.IStatus object representing the status.

setLogOutputter

public void setLogOutputter(IOutputter outputter)
Set the Adapter log outputter for GLA messages

Parameters:
outputter - component

TPTP 4.0.0 Monitoring Tools Project
Public API Specification