Package org.openrewrite
Interface ExecutionContext
- All Known Implementing Classes:
AIExecutionContextView,DelegatingExecutionContext,HttpSenderExecutionContextView,InMemoryExecutionContext,ParsingExecutionContextView,RemoteExecutionContextView,WatchableExecutionContext,WorkingDirectoryExecutionContextView
public interface ExecutionContext
Passes messages between individual visitors or parsing operations and allows errors to be propagated
back to the process controlling parsing or recipe execution.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault ExecutionContextaddObserver(TreeObserver.Subscription observer) default <V,T> T computeMessage(String key, V value, Supplier<T> defaultValue, BiFunction<V, ? super T, ? extends T> remappingFunction) default intgetCycle()default RecipeRunCycle<?><T> TgetMessage(String key) default <T> TgetMessage(String key, T defaultValue) default Set<TreeObserver.Subscription><T> TpollMessage(String key) default <T> TpollMessage(String key, T defaultValue) default voidputCurrentRecipe(Recipe recipe) voidputMessage(String key, @Nullable Object value) default <V,C extends Collection<V>>
CputMessageInCollection(String key, V value, Supplier<C> newCollection) default <T> Set<T>putMessageInSet(String key, T value)
-
Field Details
-
CURRENT_CYCLE
- See Also:
-
CURRENT_RECIPE
- See Also:
-
DATA_TABLES
- See Also:
-
RUN_TIMEOUT
- See Also:
-
REQUIRE_PRINT_EQUALS_INPUT
- See Also:
-
-
Method Details
-
addObserver
@Incubating(since="7.20.0") default ExecutionContext addObserver(TreeObserver.Subscription observer) -
getObservers
-
putMessage
-
getMessage
-
computeMessage
default <V,T> T computeMessage(String key, V value, Supplier<T> defaultValue, BiFunction<V, ? super T, ? extends T> remappingFunction) -
putMessageInCollection
default <V,C extends Collection<V>> C putMessageInCollection(String key, V value, Supplier<C> newCollection) -
putMessageInSet
-
getMessage
-
pollMessage
-
pollMessage
-
putCurrentRecipe
-
getOnError
-
getOnTimeout
BiConsumer<Throwable,ExecutionContext> getOnTimeout() -
getCycle
default int getCycle() -
getCycleDetails
-