net.sf.panoptes.module.log4j
Class LoggerRepository

java.lang.Object
  |
  +--net.sf.panoptes.module.log4j.LoggerRepository

public class LoggerRepository
extends java.lang.Object

LoggerRepository.java Controller class for all logger locations. Should probably be instanciated on a per-client-basis in the near future.

Version:
0.1
Author:
Dag Liodden

Constructor Summary
LoggerRepository(ComponentRegistry componentRegistry)
          Constructor.
 
Method Summary
 void addEvent(org.apache.log4j.spi.LoggingEvent e, java.net.InetAddress host)
          Add an event to this repository.
 void addLoggerCompnent(LoggerComponent component)
          Adds a LoggerComponent to this repository so it can be notified when the repository changes.
 Node[] getChildren()
           
 NodeDescriptor getConfigDescriptor()
           
 org.eclipse.swt.graphics.Image getIcon()
           
 LoggingEventInfo[] listEvents()
          Lists all event in this repository
 LoggingEventInfo[] listEvents(LogFilter filter)
          Lists all event in this repository
 LoggingEventInfo[] listEvents(LogFilter filter, int maxCount)
          Lists a number of events in this repository.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerRepository

public LoggerRepository(ComponentRegistry componentRegistry)
Constructor.

Method Detail

addEvent

public void addEvent(org.apache.log4j.spi.LoggingEvent e,
                     java.net.InetAddress host)
Add an event to this repository. Listeners are notified on the next batch update

Parameters:
e - the event to add
host - the source host (not used quite yet)

listEvents

public LoggingEventInfo[] listEvents()
Lists all event in this repository

Returns:
LoggingEvent[] the events

listEvents

public LoggingEventInfo[] listEvents(LogFilter filter,
                                     int maxCount)
Lists a number of events in this repository.

Parameters:
maxCount - the maximum number of events to return
Returns:
LoggingEvent[] the events

listEvents

public LoggingEventInfo[] listEvents(LogFilter filter)
Lists all event in this repository

Returns:
LoggingEvent[] the events

addLoggerCompnent

public void addLoggerCompnent(LoggerComponent component)
Adds a LoggerComponent to this repository so it can be notified when the repository changes.

See Also:
RepositoryListener

getConfigDescriptor

public NodeDescriptor getConfigDescriptor()
See Also:
com.glt.troodon.console.Node#getConfigDescriptor()

getChildren

public Node[] getChildren()
See Also:
com.glt.troodon.console.Node#getChildren()

getIcon

public org.eclipse.swt.graphics.Image getIcon()
See Also:
com.glt.troodon.console.Node#getIconName()


Copyright © 2003 . All Rights Reserved.