Package org.jboss.msc.service
Class MultipleRemoveListener<T>
- java.lang.Object
-
- org.jboss.msc.service.AbstractServiceListener<Object>
-
- org.jboss.msc.service.MultipleRemoveListener<T>
-
- Type Parameters:
T
- the callback parameter type
- All Implemented Interfaces:
ServiceListener<Object>
@Deprecated public final class MultipleRemoveListener<T> extends AbstractServiceListener<Object>
Deprecated.Service listeners are not encouraged for general user use.A service listener which calls a callback once all of the services it was attached to have been removed.- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MultipleRemoveListener.Callback<T>
Deprecated.A generalized callback for when all services are removed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MultipleRemoveListener<Runnable>
create(Runnable task)
Deprecated.Construct a new instance.static MultipleRemoveListener<LifecycleContext>
create(LifecycleContext lifecycleContext)
Deprecated.Construct a new instance which calls the lifecyclecomplete()
method when done.static <T> MultipleRemoveListener<T>
create(MultipleRemoveListener.Callback<T> callback, T attachment)
Deprecated.Construct a new instance.void
done()
Deprecated.Called when this listener has been added to all relevant services.void
listenerAdded(ServiceController<?> controller)
Deprecated.The listener has been added to a controller.void
transition(ServiceController<? extends Object> controller, ServiceController.Transition transition)
Deprecated.The service has transitioned to a new sub-state.-
Methods inherited from class org.jboss.msc.service.AbstractServiceListener
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
-
-
-
-
Method Detail
-
create
public static <T> MultipleRemoveListener<T> create(MultipleRemoveListener.Callback<T> callback, T attachment)
Deprecated.Construct a new instance.- Type Parameters:
T
- the type of the attachment- Parameters:
callback
- the callback to invokeattachment
- the attachment to pass to the callback- Returns:
- the remove listener
-
create
public static MultipleRemoveListener<Runnable> create(Runnable task)
Deprecated.Construct a new instance.- Parameters:
task
- the task to call upon completion- Returns:
- the remove listener
-
create
public static MultipleRemoveListener<LifecycleContext> create(LifecycleContext lifecycleContext)
Deprecated.Construct a new instance which calls the lifecyclecomplete()
method when done.- Parameters:
lifecycleContext
- the context to notify- Returns:
- the remove listener
-
listenerAdded
public void listenerAdded(ServiceController<?> controller)
Deprecated.The listener has been added to a controller.- Specified by:
listenerAdded
in interfaceServiceListener<T>
- Overrides:
listenerAdded
in classAbstractServiceListener<Object>
- Parameters:
controller
- the controller that this listener was added to
-
transition
public void transition(ServiceController<? extends Object> controller, ServiceController.Transition transition)
Deprecated.Description copied from class:AbstractServiceListener
The service has transitioned to a new sub-state.- Specified by:
transition
in interfaceServiceListener<T>
- Overrides:
transition
in classAbstractServiceListener<Object>
- Parameters:
controller
- the controllertransition
- the transition that occurred
-
done
public void done()
Deprecated.Called when this listener has been added to all relevant services.
-
-