org.apache.hadoop.service
Class LoggingStateChangeListener

java.lang.Object
  extended by org.apache.hadoop.service.LoggingStateChangeListener
All Implemented Interfaces:
ServiceStateChangeListener

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class LoggingStateChangeListener
extends Object
implements ServiceStateChangeListener

This is a state change listener that logs events at INFO level


Constructor Summary
LoggingStateChangeListener()
          Log events to the static log for this class
LoggingStateChangeListener(org.apache.commons.logging.Log log)
          Log events to the given log
 
Method Summary
 void stateChanged(Service service)
          Callback for a state change event: log it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingStateChangeListener

public LoggingStateChangeListener(org.apache.commons.logging.Log log)
Log events to the given log

Parameters:
log - destination for events

LoggingStateChangeListener

public LoggingStateChangeListener()
Log events to the static log for this class

Method Detail

stateChanged

public void stateChanged(Service service)
Callback for a state change event: log it

Specified by:
stateChanged in interface ServiceStateChangeListener
Parameters:
service - the service that has changed.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.