org.apache.felix.jmood.compendium
Class LogManager
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.apache.felix.jmood.compendium.LogManager
- All Implemented Interfaces:
- EventListener, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, LogManagerMBean, LogListener
public class LogManager
- extends NotificationBroadcasterSupport
- implements LogListener, MBeanRegistration, LogManagerMBean
This class enables remote management of
org.osgi.service.log.LogReaderService It enables the operator to read
the system log.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogManager
public LogManager(AgentContext ac)
setLogLevel
public void setLogLevel(int level)
- Specified by:
setLogLevel
in interface LogManagerMBean
getLogLevel
public int getLogLevel()
- Specified by:
getLogLevel
in interface LogManagerMBean
getLog
public CompositeData[] getLog()
- Specified by:
getLog
in interface LogManagerMBean
getLogMessages
public String[] getLogMessages()
- This method exposes the attribute LogFromReader for remote management.
The main difference with the log attribute is that the later uses the
level configuration specified by the log level attribute and as a
drawback does not include log entries registered before the log manager
was started.
- Specified by:
getLogMessages
in interface LogManagerMBean
- Returns:
postDeregister
public void postDeregister()
- Specified by:
postDeregister
in interface MBeanRegistration
- See Also:
MBeanRegistration.postDeregister()
postRegister
public void postRegister(Boolean registrationDone)
- Specified by:
postRegister
in interface MBeanRegistration
- Parameters:
registrationDone
- - See Also:
MBeanRegistration.postRegister(java.lang.Boolean)
preDeregister
public void preDeregister()
throws Exception
- Specified by:
preDeregister
in interface MBeanRegistration
- Throws:
Exception
- See Also:
MBeanRegistration.preDeregister()
preRegister
public ObjectName preRegister(MBeanServer server,
ObjectName name)
- Specified by:
preRegister
in interface MBeanRegistration
- Parameters:
server
- name
-
- Returns:
-
- Throws:
Exception
- See Also:
MBeanRegistration.preRegister(javax.management.MBeanServer,
javax.management.ObjectName)
logged
public void logged(LogEntry entry)
- Description copied from interface:
LogListener
- Listener method called for each LogEntry object created.
As with all event listeners, this method should return to its caller as
soon as possible.
- Specified by:
logged
in interface LogListener
- Parameters:
arg0
- - See Also:
LogListener.logged(org.osgi.service.log.LogEntry)
Copyright © 2011 Apache Software Foundation. All Rights Reserved.