Package | Description |
---|---|
com.flyingspaniel.nava.callback | |
com.flyingspaniel.nava.request | |
com.flyingspaniel.nava.utils |
Modifier and Type | Interface and Description |
---|---|
static interface |
Callback.ProducesMore<IN,OUT,MORE>
Implement this (rare) if your callback produces "more" than a single output
This will be used by a single followup callback as its more...
|
static interface |
Callback.ProducesMultiple<IN,OUT>
Implement this if your callback produces multiple single outputs
to be used by multiple followup callbacks as their IN argument.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCallback<IN,OUT>
Abstract implementation of a Callback, which also implements Emit.IListener.
Subclasses need only implement callback(). |
static class |
AbstractCallback.Canned<IN,OUT>
Inner class mainly for tests, allows for canned results
|
static class |
AbstractCallback.NOP<IN>
Class that does nothing (just calls failFast), then returns input unchanged
|
Modifier and Type | Field and Description |
---|---|
protected Callback |
AbstractCallback.nextCallback |
Modifier and Type | Method and Description |
---|---|
static Callback |
Callbacks.chainUp(Callback first,
Callback... others)
Create a chain of Callbacks, by setting nextCallback along the line...
|
Callback |
Callback.getNextCallback()
Get the callback to follow this one.
|
Callback |
AbstractCallback.getNextCallback() |
Modifier and Type | Method and Description |
---|---|
static <IN,OUT> Callable |
Callbacks.callableCallback(Callback<IN,OUT> callback,
Exception ex,
IN inData,
Object... more)
Convert any Callback into a Callable
|
static Callable |
Callbacks.callableRunASync(ExecutorService xs,
Callback first,
Object inData,
Object... more)
By wrapping runASyncInLine() in a Callable, we can now run *everything* off the original thread.
|
static Callable |
Callbacks.callableRunSync(Callback first,
Object inData,
Object... more)
Wraps runSync() in a Callable so it can be run in another thread
|
static Callback |
Callbacks.chainUp(Callback first,
Callback... others)
Create a chain of Callbacks, by setting nextCallback along the line...
|
static Callback |
Callbacks.chainUp(Callback first,
Callback... others)
Create a chain of Callbacks, by setting nextCallback along the line...
|
static Object[] |
Callbacks.getMore(Callback callback)
Utility to get the more results (or an empty []) from a callback
|
static Object |
Callbacks.runASyncInLine(ExecutorService xs,
Callback callback,
Object data,
Object... more)
Runs a completedCallback (and any associated chain) using an ExecutorService
However, since we wait for the Futures "in line" here, no real speed gain (see runASyncInLine)
|
static Object |
Callbacks.runSync(Callback callback,
Object data,
Object... more)
Runs a callback (and any associated chain) synchronously
|
void |
Callback.setNextCallback(Callback nextCallback)
Set the callback to follow this one.
|
void |
AbstractCallback.setNextCallback(Callback nextCallback) |
void |
CallbackExecutor.submitCallback(Callback first,
Object inData,
Object... more)
Submit a callback (generally the first of a chain)
|
Constructor and Description |
---|
CallbackAnd.Xception(Callback callbackThatThrew,
Throwable t) |
Modifier and Type | Class and Description |
---|---|
class |
Request |
Modifier and Type | Class and Description |
---|---|
class |
EmittingCallbackFn<IN,OUT>
"Do It All" base class
Subclasses must override callback(), and may want to override others
|
static class |
EmittingCallbackFn.NOP<IN> |
Modifier and Type | Field and Description |
---|---|
protected Callback |
EmittingCallbackFn.nextCallback |
Modifier and Type | Method and Description |
---|---|
Callback |
EmittingCallbackFn.getNextCallback() |
Modifier and Type | Method and Description |
---|---|
void |
EmittingCallbackFn.setNextCallback(Callback nextCallback) |