Package | Description |
---|---|
bayou.async |
Async programming model.
|
bayou.websocket |
WebSocket server.
|
Modifier and Type | Method and Description |
---|---|
static <T> FunctionX<List<Result<T>>,List<T>> |
AsyncBundle.triggerOf(int successThreshold,
int taskCount)
Return a simple trigger function
that's based the number of success results.
|
Modifier and Type | Method and Description |
---|---|
default <X extends Exception> Async<T> |
Async.catch__(Class<X> exceptionType,
FunctionX<X,Async<T>> exceptionHandler)
If `this` action fails with a specific exception type, invoke an exception handler.
|
default <X extends Exception> Async<T> |
Async.catch_(Class<X> exceptionType,
FunctionX<X,T> exceptionHandler)
If `this` action fails with a specific exception type, invoke an exception handler.
|
default AsyncIterator<T> |
AsyncIterator.filter_(FunctionX<T,Async<Boolean>> predicate)
Similar to
filter() , except that predicate returns Async<Boolean> instead of Boolean. |
default AsyncIterator<T> |
AsyncIterator.filter(FunctionX<T,Boolean> predicate)
Create a new iterator that retrains only elements approved by predicate.
|
default <R> AsyncIterator<R> |
AsyncIterator.flatMap(FunctionX<T,AsyncIterator<R>> func)
Create a new iterator by mapping each elements of this iterator to multiple new elements.
|
default <R> AsyncIterator<R> |
AsyncIterator.flatMap(FunctionX<T,AsyncIterator<R>> func,
FunctionX<End,AsyncIterator<R>> endFunc)
Similar to flatMap(func), except that the end-of-iteration event is also used
to generate new elements.
|
default <R> AsyncIterator<R> |
AsyncIterator.flatMap(FunctionX<T,AsyncIterator<R>> func,
FunctionX<End,AsyncIterator<R>> endFunc)
Similar to flatMap(func), except that the end-of-iteration event is also used
to generate new elements.
|
static <T> Async<Void> |
AsyncIterator.forEach_(AsyncIterator<T> elements,
FunctionX<T,Async<?>> asyncAction)
Perform asyncAction on each element.
|
default Async<Void> |
AsyncIterator.forEach_(FunctionX<T,Async<?>> asyncAction)
Similar to
forEach() , except that the action is async. |
default <R> AsyncIterator<R> |
AsyncIterator.map_(FunctionX<T,Async<R>> func)
Similar to
map() , except that `func` returns Async<R> instead of R. |
default <R> AsyncIterator<R> |
AsyncIterator.map(FunctionX<T,R> func)
Create a new iterator by mapping each elements of this iterator to a new element.
|
default <R> Async<R> |
Async.map(FunctionX<T,R> onSuccess)
After `this` action succeeds, map the value to another value.
|
default <R> Async<R> |
Async.map(FunctionX<T,R> onSuccess,
FunctionX<Exception,R> onFailure)
After `this` action completes, map the success value or the failure exception to another value.
|
default <R> Async<R> |
Async.map(FunctionX<T,R> onSuccess,
FunctionX<Exception,R> onFailure)
After `this` action completes, map the success value or the failure exception to another value.
|
default <R> Async<R> |
Async.then(FunctionX<T,Async<R>> onSuccess)
After `this` action succeeds, invoke a subsequent action.
|
default <R> Async<R> |
Async.then(FunctionX<T,Async<R>> onSuccess,
FunctionX<Exception,Async<R>> onFailure)
After `this` action completes, invoke a subsequence action.
|
default <R> Async<R> |
Async.then(FunctionX<T,Async<R>> onSuccess,
FunctionX<Exception,Async<R>> onFailure)
After `this` action completes, invoke a subsequence action.
|
default <R> Async<R> |
Async.transform(FunctionX<Result<T>,Async<R>> func)
After `this` action completes, invoke a function to transform the result.
|
Constructor and Description |
---|
AsyncBundle(Stream<Async<T>> tasks,
FunctionX<List<Result<T>>,R> trigger)
Create a bundle over the tasks, with the trigger function.
|
Modifier and Type | Method and Description |
---|---|
FunctionX<WebSocketChannel,Async<?>> |
WebSocketResponse.Accept.getChannelHandler()
The channelHandler.
|
Modifier and Type | Method and Description |
---|---|
static WebSocketResponse.Accept |
WebSocketResponse.accept(FunctionX<WebSocketChannel,Async<?>> channelHandler)
Create an Accept response.
|
Constructor and Description |
---|
Accept(String subprotocol,
FunctionX<WebSocketChannel,Async<?>> channelHandler)
Create an Accept response.
|