JBoss Modular Service Kernel API 1.0.0.Beta1

org.jboss.msc.service
Class RemovingServiceListener

java.lang.Object
  extended by org.jboss.msc.service.AbstractServiceListener<Object>
      extended by org.jboss.msc.service.RemovingServiceListener
All Implemented Interfaces:
ServiceListener<Object>

public final class RemovingServiceListener
extends AbstractServiceListener<Object>

A service listener which removes the given service as soon as it is down, used to "kill" a service.

Author:
David M. Lloyd

Constructor Summary
RemovingServiceListener()
           
 
Method Summary
 void listenerAdded(ServiceController<?> serviceController)
          The listener has been added to a controller.
 void serviceFailed(ServiceController<?> serviceController, StartException reason)
          The service start has failed.
 void serviceStarted(ServiceController<?> serviceController)
          The service is started (up).
 void serviceStarting(ServiceController<?> serviceController)
          The service is starting.
 void serviceStopped(ServiceController<?> serviceController)
          The service is stopped (down).
 void serviceStopping(ServiceController<?> serviceController)
          The service is stopping.
 
Methods inherited from class org.jboss.msc.service.AbstractServiceListener
serviceRemoved
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemovingServiceListener

public RemovingServiceListener()
Method Detail

listenerAdded

public void listenerAdded(ServiceController<?> serviceController)
The listener has been added to a controller.

Specified by:
listenerAdded in interface ServiceListener<Object>
Overrides:
listenerAdded in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller that this listener was added to

serviceStarting

public void serviceStarting(ServiceController<?> serviceController)
The service is starting. Called after the state transitions from DOWN to STARTING.

Specified by:
serviceStarting in interface ServiceListener<Object>
Overrides:
serviceStarting in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller

serviceStarted

public void serviceStarted(ServiceController<?> serviceController)
The service is started (up). Called after the state transitions from STARTING to UP.

Specified by:
serviceStarted in interface ServiceListener<Object>
Overrides:
serviceStarted in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller

serviceFailed

public void serviceFailed(ServiceController<?> serviceController,
                          StartException reason)
The service start has failed. Called after the state transitions from STARTING to START_FAILED.

Specified by:
serviceFailed in interface ServiceListener<Object>
Overrides:
serviceFailed in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller
reason - the reason for failure

serviceStopping

public void serviceStopping(ServiceController<?> serviceController)
The service is stopping. Called after the state transitions from UP to STOPPING.

Specified by:
serviceStopping in interface ServiceListener<Object>
Overrides:
serviceStopping in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller

serviceStopped

public void serviceStopped(ServiceController<?> serviceController)
The service is stopped (down). Called after the state transitions from STOPPING to DOWN.

Specified by:
serviceStopped in interface ServiceListener<Object>
Overrides:
serviceStopped in class AbstractServiceListener<Object>
Parameters:
serviceController - the controller

JBoss Modular Service Kernel API 1.0.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.