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:
java.util.concurrent.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>, java.util.concurrent.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, java.util.concurrent.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)
- Specified by:
cancel
in interfacejava.util.concurrent.Future<S>
-
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interfacejava.util.concurrent.Future<S>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfacejava.util.concurrent.Future<S>
-
get
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Specified by:
get
in interfacejava.util.concurrent.Future<S>
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
get
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
- Specified by:
get
in interfacejava.util.concurrent.Future<S>
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
-
-