org.apache.xbean.kernel
Interface ServiceMonitor

All Known Implementing Classes:
AsyncServiceMonitor, NullServiceMonitor, ServiceMonitorBroadcaster

public interface ServiceMonitor

This interface is used to monitor service lifecycle events. A ServiceMonitor can be registered with a kernel using Kernel.addServiceMonitor(ServiceMonitor) or Kernel.addServiceMonitor(ServiceMonitor, ServiceName).

Since:
2.0
Author:
Dain Sundstrom

Method Summary
 void serviceRegistered(ServiceEvent serviceEvent)
          A new service has been registered with the kernel.
 void serviceRunning(ServiceEvent serviceEvent)
          A service has entered the RUNNING state.
 void serviceStartError(ServiceEvent serviceEvent)
          An error occured while calling creating the service.
 void serviceStarting(ServiceEvent serviceEvent)
          A service has entered the STARTING state.
 void serviceStopError(ServiceEvent serviceEvent)
          An error occured while calling destroying the service.
 void serviceStopped(ServiceEvent serviceEvent)
          A service has entered the STOPPED state.
 void serviceStopping(ServiceEvent serviceEvent)
          A service has entered the RUNNING state.
 void serviceUnregistered(ServiceEvent serviceEvent)
          A service has been unregistered from the kernel.
 void serviceWaitingToStart(ServiceEvent serviceEvent)
          A service is waiting to start because some start conditions are unsatified.
 void serviceWaitingToStop(ServiceEvent serviceEvent)
          A service is waiting to stop because some stop condition is unsatified.
 

Method Detail

serviceRegistered

void serviceRegistered(ServiceEvent serviceEvent)
A new service has been registered with the kernel.

Parameters:
serviceEvent - the event information

serviceStarting

void serviceStarting(ServiceEvent serviceEvent)
A service has entered the STARTING state.

Parameters:
serviceEvent - the event information

serviceWaitingToStart

void serviceWaitingToStart(ServiceEvent serviceEvent)
A service is waiting to start because some start conditions are unsatified.

Parameters:
serviceEvent - the event information
See Also:
ServiceEvent.getUnsatisfiedConditions()

serviceStartError

void serviceStartError(ServiceEvent serviceEvent)
An error occured while calling creating the service.

Parameters:
serviceEvent - the event information
See Also:
ServiceEvent.getCause()

serviceRunning

void serviceRunning(ServiceEvent serviceEvent)
A service has entered the RUNNING state.

Parameters:
serviceEvent - the event information

serviceStopping

void serviceStopping(ServiceEvent serviceEvent)
A service has entered the RUNNING state.

Parameters:
serviceEvent - the event information

serviceWaitingToStop

void serviceWaitingToStop(ServiceEvent serviceEvent)
A service is waiting to stop because some stop condition is unsatified.

Parameters:
serviceEvent - the event information
See Also:
ServiceEvent.getUnsatisfiedConditions()

serviceStopError

void serviceStopError(ServiceEvent serviceEvent)
An error occured while calling destroying the service.

Parameters:
serviceEvent - the event information
See Also:
ServiceEvent.getCause()

serviceStopped

void serviceStopped(ServiceEvent serviceEvent)
A service has entered the STOPPED state.

Parameters:
serviceEvent - the event information

serviceUnregistered

void serviceUnregistered(ServiceEvent serviceEvent)
A service has been unregistered from the kernel.

Parameters:
serviceEvent - the event information


Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.