Package org.bsc.async
Class AsyncGenerator.Data<E>
- java.lang.Object
-
- org.bsc.async.AsyncGenerator.Data<E>
-
- Type Parameters:
E
- the type of the data element
- Enclosing interface:
- AsyncGenerator<E>
public static class AsyncGenerator.Data<E> extends Object
Represents a data element in the AsyncGenerator.
-
-
Constructor Summary
Constructors Constructor Description Data(CompletableFuture<E> data, AsyncGenerator.Embed<E> embed, Object resultValue)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <E> AsyncGenerator.Data<E>
composeWith(AsyncGenerator<E> generator, AsyncGenerator.EmbedCompletionHandler onCompletion)
static <E> AsyncGenerator.Data<E>
done()
static <E> AsyncGenerator.Data<E>
done(Object resultValue)
static <E> AsyncGenerator.Data<E>
error(Throwable exception)
boolean
isDone()
static <E> AsyncGenerator.Data<E>
of(E data)
static <E> AsyncGenerator.Data<E>
of(CompletableFuture<E> data)
-
-
-
Constructor Detail
-
Data
public Data(CompletableFuture<E> data, AsyncGenerator.Embed<E> embed, Object resultValue)
-
-
Method Detail
-
isDone
public boolean isDone()
-
of
public static <E> AsyncGenerator.Data<E> of(CompletableFuture<E> data)
-
of
public static <E> AsyncGenerator.Data<E> of(E data)
-
composeWith
public static <E> AsyncGenerator.Data<E> composeWith(AsyncGenerator<E> generator, AsyncGenerator.EmbedCompletionHandler onCompletion)
-
done
public static <E> AsyncGenerator.Data<E> done()
-
done
public static <E> AsyncGenerator.Data<E> done(Object resultValue)
-
error
public static <E> AsyncGenerator.Data<E> error(Throwable exception)
-
-