org.jboss.osgi.framework
Class FutureServiceValue<T>
java.lang.Object
org.jboss.osgi.framework.FutureServiceValue<T>
- All Implemented Interfaces:
- Future<T>
public final class FutureServiceValue<T>
- extends Object
- implements Future<T>
A Future that waits for the given service to come up and returns it's value.
Use cautiously and only if there is no way to use direct service dependencies instead.
- Since:
- 29-Mar-2011
- Author:
- thomas.diesler@jboss.com
|
Constructor Summary |
FutureServiceValue(org.jboss.msc.service.ServiceController<T> controller)
|
FutureServiceValue(org.jboss.msc.service.ServiceController<T> controller,
org.jboss.msc.service.ServiceController.State state)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FutureServiceValue
public FutureServiceValue(org.jboss.msc.service.ServiceController<T> controller)
FutureServiceValue
public FutureServiceValue(org.jboss.msc.service.ServiceController<T> controller,
org.jboss.msc.service.ServiceController.State state)
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel in interface Future<T>
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled in interface Future<T>
isDone
public boolean isDone()
- Specified by:
isDone in interface Future<T>
get
public T get()
throws ExecutionException
- Specified by:
get in interface Future<T>
- Throws:
ExecutionException
get
public T get(long timeout,
TimeUnit unit)
throws ExecutionException,
TimeoutException
- Specified by:
get in interface Future<T>
- Throws:
ExecutionException
TimeoutException
Copyright © 2012. All Rights Reserved.