org.oddjob.jmx.server
Class LogArchiverHelper

java.lang.Object
  extended by org.oddjob.jmx.server.LogArchiverHelper

public class LogArchiverHelper
extends Object

Helper class for return log and console messages from an OddjobMBean.


Constructor Summary
LogArchiverHelper()
           
 
Method Summary
static String consoleId(Object component, ConsoleArchiver archiver)
          Get the console id.
static LogEvent[] retrieveConsoleEvents(Object component, ConsoleArchiver archiver, Long last, Integer max)
          Get an array of the latest console events.
static LogEvent[] retrieveLogEvents(Object component, LogArchiver archiver, Long last, Integer max)
          Get an array of the latest log events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogArchiverHelper

public LogArchiverHelper()
Method Detail

retrieveLogEvents

public static LogEvent[] retrieveLogEvents(Object component,
                                           LogArchiver archiver,
                                           Long last,
                                           Integer max)
Get an array of the latest log events.

Parameters:
component - The componet to get log events for.
archiver - The LogArchiver.
last - The sequence of the last event required.
max - The total number of events.
Returns:
An array of LogEvent objects.

consoleId

public static String consoleId(Object component,
                               ConsoleArchiver archiver)
Get the console id.

Parameters:
component - The component.
archiver - The ConsoleArchvier.
Returns:
The console archiver id.

retrieveConsoleEvents

public static LogEvent[] retrieveConsoleEvents(Object component,
                                               ConsoleArchiver archiver,
                                               Long last,
                                               Integer max)
Get an array of the latest console events.

Parameters:
component - The component.
archiver - The ConsoleArchvier.
last - The last event number.
max - The maximum events required.
Returns:
An array of LogEvent objects.