Package net.welen.jmole.protocols.logger
Class Logger
- java.lang.Object
-
- net.welen.jmole.protocols.AbstractProtocol
-
- net.welen.jmole.protocols.AbstractIntervalProtocol
-
- net.welen.jmole.protocols.logger.Logger
-
- All Implemented Interfaces:
Runnable,EventListener,NotificationListener,IntervalProtocolMBean,LoggerMBean,Protocol,ProtocolMBean
public class Logger extends AbstractIntervalProtocol implements LoggerMBean
-
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFormat()StringgetLevel()voidhandleCritical(String name, String attribute, net.welen.jmole.presentation.PresentationInformation presentationInformation, String message)Handle critical problemprotected voidhandleMeasurement(String category, String name, String attribute, Object value, net.welen.jmole.presentation.PresentationInformation presentationInformation)voidhandleWarning(String name, String attribute, net.welen.jmole.presentation.PresentationInformation presentationInformation, String message)Handle WarningvoidsetFormat(String format)voidsetLevel(String level)voidstartProtocol(JMole jmole)Callback for starting the protocolvoidstopProtocol()Callback for stopping the protocol-
Methods inherited from class net.welen.jmole.protocols.AbstractIntervalProtocol
getInterval, run, setInterval
-
Methods inherited from class net.welen.jmole.protocols.AbstractProtocol
getJMole, getName, handleNotification, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.welen.jmole.protocols.IntervalProtocolMBean
getInterval, setInterval
-
Methods inherited from interface net.welen.jmole.protocols.ProtocolMBean
getName
-
-
-
-
Method Detail
-
startProtocol
public void startProtocol(JMole jmole) throws Exception
Description copied from interface:ProtocolCallback for starting the protocol- Specified by:
startProtocolin interfaceProtocol- Overrides:
startProtocolin classAbstractIntervalProtocol- Throws:
Exception
-
stopProtocol
public void stopProtocol() throws ExceptionDescription copied from interface:ProtocolCallback for stopping the protocol- Specified by:
stopProtocolin interfaceProtocol- Overrides:
stopProtocolin classAbstractIntervalProtocol- Throws:
Exception
-
getLevel
public String getLevel()
- Specified by:
getLevelin interfaceLoggerMBean
-
setLevel
public void setLevel(String level)
- Specified by:
setLevelin interfaceLoggerMBean
-
getFormat
public String getFormat()
- Specified by:
getFormatin interfaceLoggerMBean
-
setFormat
public void setFormat(String format)
- Specified by:
setFormatin interfaceLoggerMBean
-
handleMeasurement
protected void handleMeasurement(String category, String name, String attribute, Object value, net.welen.jmole.presentation.PresentationInformation presentationInformation) throws Exception
- Specified by:
handleMeasurementin classAbstractIntervalProtocol- Throws:
Exception
-
handleWarning
public void handleWarning(String name, String attribute, net.welen.jmole.presentation.PresentationInformation presentationInformation, String message) throws Exception
Description copied from interface:ProtocolHandle Warning- Specified by:
handleWarningin interfaceProtocol- Throws:
Exception
-
handleCritical
public void handleCritical(String name, String attribute, net.welen.jmole.presentation.PresentationInformation presentationInformation, String message) throws Exception
Description copied from interface:ProtocolHandle critical problem- Specified by:
handleCriticalin interfaceProtocol- Throws:
Exception
-
-