JBoss Modular Service Kernel API 1.0.0.CR2

org.jboss.msc.service
Class AbstractServiceListener<S>

java.lang.Object
  extended by org.jboss.msc.service.AbstractServiceListener<S>
Type Parameters:
S - the service type
All Implemented Interfaces:
ServiceListener<S>
Direct Known Subclasses:
MultipleRemoveListener, TimingServiceListener

public abstract class AbstractServiceListener<S>
extends java.lang.Object
implements ServiceListener<S>

An abstract implementation of a service listener whose methods do nothing.

Author:
David M. Lloyd, Flavia Rainone

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.msc.service.ServiceListener
ServiceListener.Inheritance
 
Constructor Summary
AbstractServiceListener()
           
 
Method Summary
 void dependencyFailed(ServiceController<? extends S> controller)
          A dependency of the service has failed.
 void dependencyFailureCleared(ServiceController<? extends S> controller)
          A dependency of the service is retrying to start.
 void immediateDependencyAvailable(ServiceController<? extends S> controller)
          All unavailable immediate dependencies of the service are now available, i.e., they are installed and are not administratively disabled.
 void immediateDependencyUnavailable(ServiceController<? extends S> controller)
          An immediate dependency of the service is uninstalled or administratively disabled.
 void listenerAdded(ServiceController<? extends S> controller)
          The listener has been added to a controller.
 void serviceRemoveRequestCleared(ServiceController<? extends S> controller)
          The service removal is canceled.
 void serviceRemoveRequested(ServiceController<? extends S> controller)
          The service is going to be removed.
 void transition(ServiceController<? extends S> controller, ServiceController.Transition transition)
          The service has transitioned to a new sub-state.
 void transitiveDependencyAvailable(ServiceController<? extends S> controller)
          All unavailable transitive dependencies of the service are now available (installed and not administratively disabled).
 void transitiveDependencyUnavailable(ServiceController<? extends S> controller)
          A transitive dependency of the service is uninstalled or administratively disabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServiceListener

public AbstractServiceListener()
Method Detail

listenerAdded

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

Specified by:
listenerAdded in interface ServiceListener<S>
Parameters:
controller - the controller that this listener was added to

transition

public void transition(ServiceController<? extends S> controller,
                       ServiceController.Transition transition)
The service has transitioned to a new sub-state.

Specified by:
transition in interface ServiceListener<S>
Parameters:
controller - the controller
transition - the transition that occurred

serviceRemoveRequested

public void serviceRemoveRequested(ServiceController<? extends S> controller)
The service is going to be removed. Called when the service mode is changed to REMOVE.

Specified by:
serviceRemoveRequested in interface ServiceListener<S>
Parameters:
controller - the controller

serviceRemoveRequestCleared

public void serviceRemoveRequestCleared(ServiceController<? extends S> controller)
The service removal is canceled. Called when the service mode is changed from REMOVE to any other mode. Such a mode change can only be successfully performed if setMode is called before the service is removed.

Specified by:
serviceRemoveRequestCleared in interface ServiceListener<S>
Parameters:
controller - the controller.

dependencyFailed

public void dependencyFailed(ServiceController<? extends S> controller)
A dependency of the service has failed. Called after the dependency state transitions from STARTING to START_FAILED.

Dependency failures that occur after the notified failure do not result in new dependencyFailed notifications. A new call to this method will be made to notify new failures only if the previous failures have been cleared.

This method is invoked to notify both immediate and transitive dependency failures.

Specified by:
dependencyFailed in interface ServiceListener<S>
Parameters:
controller - the controller

dependencyFailureCleared

public void dependencyFailureCleared(ServiceController<? extends S> controller)
A dependency of the service is retrying to start. Called after the dependency state transitions from START_FAILED to STARTING.

Specified by:
dependencyFailureCleared in interface ServiceListener<S>
Parameters:
controller - the controller

immediateDependencyUnavailable

public void immediateDependencyUnavailable(ServiceController<? extends S> controller)
An immediate dependency of the service is uninstalled or administratively disabled.

Immediate dependencies that are subsequently unavailable do not result in new immediateDependencyUnavailable notifications. A new call to this method will only be made to notify newly found unavailable dependencies if the previously unavailable dependencies have been cleared.

Specified by:
immediateDependencyUnavailable in interface ServiceListener<S>
Parameters:
controller - the controller

immediateDependencyAvailable

public void immediateDependencyAvailable(ServiceController<? extends S> controller)
All unavailable immediate dependencies of the service are now available, i.e., they are installed and are not administratively disabled.
This method will be invoked only after ServiceListener.immediateDependencyUnavailable(ServiceController) is called.

Specified by:
immediateDependencyAvailable in interface ServiceListener<S>
Parameters:
controller - the controller

transitiveDependencyUnavailable

public void transitiveDependencyUnavailable(ServiceController<? extends S> controller)
A transitive dependency of the service is uninstalled or administratively disabled.

Transitive dependencies that are subsequently unavailable do not result in new transitiveDependencyUnavailable notifications. A new call to this method will only be made to notify newly found unavailable dependencies if the previously unavailable dependencies have all become available.

Specified by:
transitiveDependencyUnavailable in interface ServiceListener<S>
Parameters:
controller - the controller

transitiveDependencyAvailable

public void transitiveDependencyAvailable(ServiceController<? extends S> controller)
All unavailable transitive dependencies of the service are now available (installed and not administratively disabled).
This method will be invoked only after ServiceListener.transitiveDependencyUnavailable(ServiceController) is called.

Specified by:
transitiveDependencyAvailable in interface ServiceListener<S>
Parameters:
controller - the controller

JBoss Modular Service Kernel API 1.0.0.CR2

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