You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.
There should be some defined callback interfaces that can be used as anonymous instances passed to Gumshoe for execution within a context. The interface would be something like this:
Java 7:
Gumshoe.get().context("my context").put("a", 1).thenDo(newInContextCallback() {
publicvoidexec() {
// do a bunch of stuff// emit some events// etc....
}
});
Java 8:
Gumshoe.get().context("my context").put("a", 1).thenDo(() -> {
// do a bunch of stuff// emit some events// etc....
});
The thenDo method would start the context and make sure it is cleaned up correctly, either with a finish or fail if an exception is encountered when executing the callback.
The text was updated successfully, but these errors were encountered:
Addresses issue #26 to give callback interfaces to be executed
within a Gumshoe managed context. The context will start,
execute the callable, finish the context (or fail it if exception)
then return result (or propagate exception).
Two interfaces are supported -- the standard lib Callable interface
when you care about a return value and the Gumshoe provided
VoidCallable interface when you don't care about a return value.
There should be some defined callback interfaces that can be used as anonymous instances passed to Gumshoe for execution within a context. The interface would be something like this:
Java 7:
Java 8:
The
thenDo
method would start the context and make sure it is cleaned up correctly, either with a finish or fail if an exception is encountered when executing the callback.The text was updated successfully, but these errors were encountered: