Package | Description |
---|---|
org.osgi.service.async |
Asynchronous Services Package Version 1.0.
|
org.osgi.service.async.delegate |
Asynchronous Services Delegation Package Version 1.0.
|
org.osgi.service.component.runtime |
Service Component Runtime Package Version 1.4.
|
org.osgi.service.repository |
Repository Service Package Version 1.1.
|
org.osgi.util.promise |
Promise Package Version 1.1.
|
org.osgi.util.pushstream |
Push Stream Package Version 1.0.
|
Modifier and Type | Method and Description |
---|---|
Promise<?> |
Async.call()
Invoke the last method call registered by a mediated object as an
asynchronous task.
|
<R> Promise<R> |
Async.call(R r)
Invoke the last method call registered by a mediated object as an
asynchronous task.
|
Promise<java.lang.Void> |
Async.execute()
Invoke the last method call registered by a mediated object as a
"fire-and-forget" asynchronous task.
|
Modifier and Type | Method and Description |
---|---|
Promise<?> |
AsyncDelegate.async(java.lang.reflect.Method m,
java.lang.Object[] args)
Invoke the specified method as an asynchronous task with the specified
arguments.
|
Modifier and Type | Method and Description |
---|---|
Promise<java.lang.Void> |
ServiceComponentRuntime.disableComponent(ComponentDescriptionDTO description)
Disables the specified component description.
|
Promise<java.lang.Void> |
ServiceComponentRuntime.enableComponent(ComponentDescriptionDTO description)
Enables the specified component description.
|
Modifier and Type | Method and Description |
---|---|
Promise<java.util.Collection<org.osgi.resource.Resource>> |
Repository.findProviders(RequirementExpression expression)
Find the resources that match the specified requirement expression.
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
DeferredPromiseImpl<T>
Deferred Promise implementation.
|
(package private) class |
FailedPromiseImpl<T>
Failed Promise implementation.
|
(package private) class |
PromiseImpl<T>
Abstract Promise implementation.
|
(package private) class |
ResolvedPromiseImpl<T>
Resolved Promise implementation.
|
Modifier and Type | Field and Description |
---|---|
private Promise<? extends T> |
DeferredPromiseImpl.FallbackTo.fallback |
private Promise<? extends T> |
DeferredPromiseImpl.FallbackChain.fallback |
private Promise<? extends P> |
DeferredPromiseImpl.ResolveWith.promise |
private Promise<? extends T> |
DeferredPromiseImpl.Chain.promise |
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<Promise<?>> |
FailedPromisesException.failed |
private Function<? super P,Promise<? extends T>> |
DeferredPromiseImpl.FlatMap.mapper |
private java.util.List<Promise<S>> |
PromiseFactory.All.promises |
private Function<Promise<?>,? extends T> |
DeferredPromiseImpl.Recover.recovery |
private Function<Promise<?>,Promise<? extends T>> |
DeferredPromiseImpl.RecoverWith.recovery |
private Function<Promise<?>,Promise<? extends T>> |
DeferredPromiseImpl.RecoverWith.recovery |
Modifier and Type | Method and Description |
---|---|
static <T,S extends T> |
Promises.all(java.util.Collection<Promise<S>> promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
<T,S extends T> |
PromiseFactory.all(java.util.Collection<Promise<S>> promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
static <T> Promise<java.util.List<T>> |
Promises.all(Promise<? extends T>... promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
Promise<R> |
Success.call(Promise<T> resolved)
Success callback for a Promise.
|
Promise<T> |
Promise.delay(long milliseconds)
Delay after the resolution of this Promise.
|
Promise<T> |
PromiseImpl.delay(long millis)
Delay after the resolution of this Promise.
|
static <T> Promise<T> |
Promises.failed(java.lang.Throwable failure)
Returns a new Promise that has been resolved with the specified failure.
|
<T> Promise<T> |
PromiseFactory.failed(java.lang.Throwable failure)
Returns a new Promise that has been resolved with the specified failure.
|
Promise<T> |
Promise.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<T> |
PromiseImpl.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<T> |
ResolvedPromiseImpl.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<T> |
Promise.filter(Predicate<? super T> predicate)
Filter the value of this Promise.
|
Promise<T> |
FailedPromiseImpl.filter(Predicate<? super T> predicate)
Filter the value of this Promise.
|
Promise<T> |
PromiseImpl.filter(Predicate<? super T> predicate)
Filter the value of this Promise.
|
<R> Promise<R> |
Promise.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
<R> Promise<R> |
FailedPromiseImpl.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
<R> Promise<R> |
PromiseImpl.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
Promise<T> |
Deferred.getPromise()
Returns the Promise associated with this Deferred.
|
<R> Promise<R> |
Promise.map(Function<? super T,? extends R> mapper)
Map the value of this Promise.
|
<R> Promise<R> |
FailedPromiseImpl.map(Function<? super T,? extends R> mapper)
Map the value of this Promise.
|
<R> Promise<R> |
PromiseImpl.map(Function<? super T,? extends R> mapper)
Map the value of this Promise.
|
Promise<T> |
Promise.onFailure(Consumer<? super java.lang.Throwable> failure)
Register a callback to be called with the failure for this Promise when
this Promise is resolved with a failure.
|
Promise<T> |
PromiseImpl.onFailure(Consumer<? super java.lang.Throwable> failure)
Register a callback to be called with the failure for this Promise when
this Promise is resolved with a failure.
|
Promise<T> |
ResolvedPromiseImpl.onFailure(Consumer<? super java.lang.Throwable> failure)
Register a callback to be called with the failure for this Promise when
this Promise is resolved with a failure.
|
Promise<T> |
Promise.onResolve(java.lang.Runnable callback)
Register a callback to be called when this Promise is resolved.
|
Promise<T> |
PromiseImpl.onResolve(java.lang.Runnable callback)
Register a callback to be called when this Promise is resolved.
|
Promise<T> |
Promise.onSuccess(Consumer<? super T> success)
Register a callback to be called with the result of this Promise when
this Promise is resolved successfully.
|
Promise<T> |
FailedPromiseImpl.onSuccess(Consumer<? super T> success)
Register a callback to be called with the result of this Promise when
this Promise is resolved successfully.
|
Promise<T> |
PromiseImpl.onSuccess(Consumer<? super T> success)
Register a callback to be called with the result of this Promise when
this Promise is resolved successfully.
|
Promise<T> |
Promise.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
PromiseImpl.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
ResolvedPromiseImpl.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
Promise.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
PromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
ResolvedPromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
static <T> Promise<T> |
Promises.resolved(T value)
Returns a new Promise that has been resolved with the specified value.
|
<T> Promise<T> |
PromiseFactory.resolved(T value)
Returns a new Promise that has been resolved with the specified value.
|
Promise<java.lang.Void> |
Deferred.resolveWith(Promise<? extends T> with)
Resolve the Promise associated with this Deferred with the specified
Promise.
|
(package private) Promise<java.lang.Void> |
DeferredPromiseImpl.resolveWith(Promise<? extends T> with)
Resolve this Promise with the specified Promise.
|
<T> Promise<T> |
PromiseFactory.submit(java.util.concurrent.Callable<? extends T> task)
Returns a new Promise that will hold the result of the specified task.
|
<R> Promise<R> |
Promise.then(Success<? super T,? extends R> success)
Chain a new Promise to this Promise with a Success callback.
|
<R> Promise<R> |
PromiseImpl.then(Success<? super T,? extends R> success)
Chain a new Promise to this Promise with a Success callback.
|
<R> Promise<R> |
Promise.then(Success<? super T,? extends R> success,
Failure failure)
Chain a new Promise to this Promise with Success and Failure callbacks.
|
<R> Promise<R> |
FailedPromiseImpl.then(Success<? super T,? extends R> success,
Failure failure)
Chain a new Promise to this Promise with Success and Failure callbacks.
|
<R> Promise<R> |
PromiseImpl.then(Success<? super T,? extends R> success,
Failure failure)
Chain a new Promise to this Promise with Success and Failure callbacks.
|
<R> Promise<R> |
ResolvedPromiseImpl.then(Success<? super T,? extends R> success,
Failure failure)
Chain a new Promise to this Promise with Success and Failure callbacks.
|
Promise<T> |
Promise.thenAccept(Consumer<? super T> consumer)
Chain a new Promise to this Promise with a Consumer callback that
receives the value of this Promise when it is successfully resolved.
|
Promise<T> |
FailedPromiseImpl.thenAccept(Consumer<? super T> consumer)
Chain a new Promise to this Promise with a Consumer callback that
receives the value of this Promise when it is successfully resolved.
|
Promise<T> |
PromiseImpl.thenAccept(Consumer<? super T> consumer)
Chain a new Promise to this Promise with a Consumer callback that
receives the value of this Promise when it is successfully resolved.
|
Promise<T> |
Promise.timeout(long milliseconds)
Time out the resolution of this Promise.
|
Promise<T> |
FailedPromiseImpl.timeout(long millis)
Time out the resolution of this Promise.
|
Promise<T> |
PromiseImpl.timeout(long millis)
Time out the resolution of this Promise.
|
Promise<T> |
ResolvedPromiseImpl.timeout(long millis)
Time out the resolution of this Promise.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Promise<?>> |
FailedPromisesException.getFailedPromises()
Returns the collection of Promises that have been resolved with a
failure.
|
Modifier and Type | Method and Description |
---|---|
static <T> Promise<java.util.List<T>> |
Promises.all(Promise<? extends T>... promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
Promise<R> |
Success.call(Promise<T> resolved)
Success callback for a Promise.
|
(package private) static <V> void |
PromiseImpl.chain(Promise<V> promise,
java.lang.Runnable chain)
Run the specified chain when the specified promise is resolved.
|
(package private) static <R> PromiseImpl.Result<R> |
PromiseImpl.collect(Promise<? extends R> promise)
Return a holder of the result of the specified Promise.
|
void |
Failure.fail(Promise<?> resolved)
Failure callback for a Promise.
|
Promise<T> |
Promise.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<T> |
PromiseImpl.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<T> |
ResolvedPromiseImpl.fallbackTo(Promise<? extends T> fallback)
Fall back to the value of the specified Promise if this Promise fails.
|
Promise<java.lang.Void> |
Deferred.resolveWith(Promise<? extends T> with)
Resolve the Promise associated with this Deferred with the specified
Promise.
|
(package private) Promise<java.lang.Void> |
DeferredPromiseImpl.resolveWith(Promise<? extends T> with)
Resolve this Promise with the specified Promise.
|
Modifier and Type | Method and Description |
---|---|
static <T,S extends T> |
Promises.all(java.util.Collection<Promise<S>> promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
<T,S extends T> |
PromiseFactory.all(java.util.Collection<Promise<S>> promises)
Returns a new Promise that is a latch on the resolution of the specified
Promises.
|
<R> Promise<R> |
Promise.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
<R> Promise<R> |
FailedPromiseImpl.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
<R> Promise<R> |
PromiseImpl.flatMap(Function<? super T,Promise<? extends R>> mapper)
FlatMap the value of this Promise.
|
Promise<T> |
Promise.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
PromiseImpl.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
ResolvedPromiseImpl.recover(Function<Promise<?>,? extends T> recovery)
Recover from a failure of this Promise with a recovery value.
|
Promise<T> |
Promise.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
Promise.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
PromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
PromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
ResolvedPromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Promise<T> |
ResolvedPromiseImpl.recoverWith(Function<Promise<?>,Promise<? extends T>> recovery)
Recover from a failure of this Promise with a recovery Promise.
|
Constructor and Description |
---|
Chain(Promise<? extends T> promise) |
FallbackChain(Promise<? extends T> fallback,
java.lang.Throwable failure) |
FallbackTo(PromiseImpl<T> promise,
Promise<? extends T> fallback) |
ResolveWith(Promise<? extends P> promise,
DeferredPromiseImpl<P> target) |
Constructor and Description |
---|
All(DeferredPromiseImpl<java.util.List<T>> chained,
java.util.List<Promise<S>> promises) |
FailedPromisesException(java.util.Collection<Promise<?>> failed,
java.lang.Throwable cause)
Create a new FailedPromisesException with the specified Promises.
|
FlatMap(PromiseImpl<P> promise,
Function<? super P,Promise<? extends T>> mapper) |
Recover(PromiseImpl<T> promise,
Function<Promise<?>,? extends T> recovery) |
RecoverWith(PromiseImpl<T> promise,
Function<Promise<?>,Promise<? extends T>> recovery) |
RecoverWith(PromiseImpl<T> promise,
Function<Promise<?>,Promise<? extends T>> recovery) |
Modifier and Type | Method and Description |
---|---|
Promise<java.lang.Boolean> |
AbstractPushStreamImpl.allMatch(Predicate<? super T> predicate) |
Promise<java.lang.Boolean> |
PushStream.allMatch(Predicate<? super T> predicate)
Closes the channel and resolve the promise with false when the predicate
does not matches a pay load.
|
Promise<java.lang.Boolean> |
AbstractPushStreamImpl.anyMatch(Predicate<? super T> predicate) |
Promise<java.lang.Boolean> |
PushStream.anyMatch(Predicate<? super T> predicate)
Close the channel and resolve the promise with true when the predicate
matches a payload.
|
private Promise<java.lang.Void> |
SimplePushEventSourceImpl.closedConnectPromise() |
<R,A> Promise<R> |
AbstractPushStreamImpl.collect(java.util.stream.Collector<? super T,A,R> collector) |
<R,A> Promise<R> |
PushStream.collect(java.util.stream.Collector<? super T,A,R> collector)
See Stream.
|
Promise<java.lang.Void> |
SimplePushEventSource.connectPromise()
This method can be used to delay event generation until an event source
has connected.
|
Promise<java.lang.Void> |
SimplePushEventSourceImpl.connectPromise() |
Promise<java.lang.Long> |
AbstractPushStreamImpl.count() |
Promise<java.lang.Long> |
PushStream.count()
See Stream.
|
private Promise<java.lang.Long> |
SimplePushEventSourceImpl.deliver(java.util.List<PushEventConsumer<? super T>> toCall,
PushEvent<T> event) |
private Promise<java.lang.Long> |
SimplePushEventSourceImpl.doCall(PushEvent<T> event,
PushEventConsumer<? super T> pec) |
private Promise<java.lang.Long> |
SimplePushEventSourceImpl.doSendWithBackPressure(PushEventConsumer<? super T> pec,
PushEvent<T> event) |
Promise<java.util.Optional<T>> |
AbstractPushStreamImpl.findAny() |
Promise<java.util.Optional<T>> |
PushStream.findAny()
Close the channel and resolve the promise with the first element.
|
Promise<java.util.Optional<T>> |
AbstractPushStreamImpl.findFirst() |
Promise<java.util.Optional<T>> |
PushStream.findFirst()
Close the channel and resolve the promise with the first element.
|
Promise<java.lang.Void> |
AbstractPushStreamImpl.forEach(java.util.function.Consumer<? super T> action) |
Promise<java.lang.Void> |
PushStream.forEach(java.util.function.Consumer<? super T> action)
Execute the action for each event received until the channel is closed.
|
Promise<java.lang.Long> |
AbstractPushStreamImpl.forEachEvent(PushEventConsumer<? super T> action) |
Promise<java.lang.Long> |
PushStream.forEachEvent(PushEventConsumer<? super T> action)
Pass on each event to another consumer until the stream is closed.
|
Promise<java.util.Optional<T>> |
AbstractPushStreamImpl.max(java.util.Comparator<? super T> comparator) |
Promise<java.util.Optional<T>> |
PushStream.max(java.util.Comparator<? super T> comparator)
See Stream.
|
Promise<java.util.Optional<T>> |
AbstractPushStreamImpl.min(java.util.Comparator<? super T> comparator) |
Promise<java.util.Optional<T>> |
PushStream.min(java.util.Comparator<? super T> comparator)
See Stream.
|
Promise<java.lang.Boolean> |
AbstractPushStreamImpl.noneMatch(Predicate<? super T> predicate) |
Promise<java.lang.Boolean> |
PushStream.noneMatch(Predicate<? super T> predicate)
Closes the channel and resolve the promise with false when the predicate
matches any pay load.
|
Promise<java.util.Optional<T>> |
AbstractPushStreamImpl.reduce(java.util.function.BinaryOperator<T> accumulator) |
Promise<java.util.Optional<T>> |
PushStream.reduce(java.util.function.BinaryOperator<T> accumulator)
Standard reduce without identity, so the return is an Optional.
|
Promise<T> |
AbstractPushStreamImpl.reduce(T identity,
java.util.function.BinaryOperator<T> accumulator) |
Promise<T> |
PushStream.reduce(T identity,
java.util.function.BinaryOperator<T> accumulator)
Standard reduce, see Stream.
|
<U> Promise<U> |
AbstractPushStreamImpl.reduce(U identity,
java.util.function.BiFunction<U,? super T,U> accumulator,
java.util.function.BinaryOperator<U> combiner) |
<U> Promise<U> |
PushStream.reduce(U identity,
java.util.function.BiFunction<U,? super T,U> accumulator,
java.util.function.BinaryOperator<U> combiner)
Standard reduce with identity, accumulator and combiner.
|
Promise<java.lang.Object[]> |
AbstractPushStreamImpl.toArray() |
Promise<java.lang.Object[]> |
PushStream.toArray()
Collect the payloads in an Object array after the channel is closed.
|
<A extends T> |
AbstractPushStreamImpl.toArray(java.util.function.IntFunction<A[]> generator) |
<A extends T> |
PushStream.toArray(java.util.function.IntFunction<A[]> generator)
Collect the payloads in an Object array after the channel is closed.
|
Modifier and Type | Method and Description |
---|---|
<R> PushStream<R> |
AbstractPushStreamImpl.asyncMap(int n,
int delay,
Function<? super T,Promise<? extends R>> mapper) |
<R> PushStream<R> |
PushStream.asyncMap(int n,
int delay,
Function<? super T,Promise<? extends R>> mapper)
Asynchronously map the payload values.
|