org.oddjob.logging.cache
Class LocalConsoleArchiver

java.lang.Object
  extended by org.oddjob.logging.cache.LocalConsoleArchiver
All Implemented Interfaces:
ConsoleArchiver

public class LocalConsoleArchiver
extends Object
implements ConsoleArchiver

An implementation of a ConsoleArchiver for the local JVM. An Explorer or Server job will attach this archiver to a job node to capture console output from that node and it's children down to a node which is a different console archiver ( because it's a separate process or is getting console output from a remote node).

Author:
Rob Gordon.

Constructor Summary
LocalConsoleArchiver()
           
 
Method Summary
 void addConsoleListener(LogListener l, Object component, long last, int history)
          Add a listener to the archiver which will receive all missed events.
 String consoleIdFor(Object component)
          Get the console id for a given component.
 void onDestroy()
          Does nothing at the moment.
 void removeConsoleListener(LogListener l, Object component)
          Remove the LogListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalConsoleArchiver

public LocalConsoleArchiver()
Method Detail

addConsoleListener

public void addConsoleListener(LogListener l,
                               Object component,
                               long last,
                               int history)
Description copied from interface: ConsoleArchiver
Add a listener to the archiver which will receive all missed events. The idea of receiving only missed event is to minimise network traffic when used remotely.

Specified by:
addConsoleListener in interface ConsoleArchiver
Parameters:
l - The logListener which will recieve the events.
component - The component whose console to receive events for.
last - The last event number recieved. The LogArchive will not send messages from before this number.
history - The maximum messages to send up to the most recent.

removeConsoleListener

public void removeConsoleListener(LogListener l,
                                  Object component)
Description copied from interface: ConsoleArchiver
Remove the LogListener.

Specified by:
removeConsoleListener in interface ConsoleArchiver
Parameters:
l - The LogListener.

consoleIdFor

public String consoleIdFor(Object component)
Description copied from interface: ConsoleArchiver
Get the console id for a given component.

Specified by:
consoleIdFor in interface ConsoleArchiver
Parameters:
component - The component.
Returns:
The console id.

onDestroy

public void onDestroy()
Does nothing at the moment.