Class ServiceListenerFuture<S,V>
- java.lang.Object
-
- org.jboss.msc.service.AbstractServiceListener<S>
-
- org.camunda.bpm.container.impl.jboss.util.ServiceListenerFuture<S,V>
-
- All Implemented Interfaces:
Future<V>
,org.jboss.msc.service.ServiceListener<S>
public abstract class ServiceListenerFuture<S,V> extends org.jboss.msc.service.AbstractServiceListener<S> implements org.jboss.msc.service.ServiceListener<S>, Future<V>
A
Future
implementation backed by aServiceListener
- Author:
- Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description protected S
serviceInstance
protected V
value
-
Constructor Summary
Constructors Constructor Description ServiceListenerFuture(S serviceInstance)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
V
get()
V
get(long timeout, TimeUnit unit)
boolean
isCancelled()
boolean
isDone()
protected abstract void
serviceAvailable()
void
transition(org.jboss.msc.service.ServiceController<? extends S> controller, org.jboss.msc.service.ServiceController.Transition transition)
-
Methods inherited from class org.jboss.msc.service.AbstractServiceListener
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, listenerAdded, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.msc.service.ServiceListener
dependencyFailed, dependencyFailureCleared, immediateDependencyAvailable, immediateDependencyUnavailable, listenerAdded, serviceRemoveRequestCleared, serviceRemoveRequested, transitiveDependencyAvailable, transitiveDependencyUnavailable
-
-
-
-
Constructor Detail
-
ServiceListenerFuture
public ServiceListenerFuture(S serviceInstance)
-
-
Method Detail
-
transition
public void transition(org.jboss.msc.service.ServiceController<? extends S> controller, org.jboss.msc.service.ServiceController.Transition transition)
-
serviceAvailable
protected abstract void serviceAvailable()
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfaceFuture<S>
-
get
public V get() throws InterruptedException, ExecutionException
- Specified by:
get
in interfaceFuture<S>
- Throws:
InterruptedException
ExecutionException
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
get
in interfaceFuture<S>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-