Class ReactiveScriptContext
java.lang.Object
com.soulfiremc.server.script.ReactiveScriptContext
Reactive execution context for scripts.
Per-invocation state (output sinks) lives in ExecutionRun, not here.
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveScriptContext(InstanceManager instance, ScriptEventListener eventListener) Creates a new reactive script context. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels the script execution.booleanreactor.core.Disposablereactor.core.scheduler.SchedulerGets the Reactor scheduler for reactive operations.instance()booleanChecks if execution has been cancelled.voidreactor.core.scheduler.SchedulervoidsetExecution(reactor.core.Disposable execution) Sets the main execution disposable for cancellation.
-
Constructor Details
-
ReactiveScriptContext
Creates a new reactive script context.- Parameters:
instance- the SoulFire instanceeventListener- listener for script execution events
-
-
Method Details
-
scheduler
-
log
-
getReactorScheduler
public reactor.core.scheduler.Scheduler getReactorScheduler()Gets the Reactor scheduler for reactive operations.- Returns:
- the Reactor scheduler
-
isCancelled
public boolean isCancelled()Checks if execution has been cancelled.- Returns:
- true if cancelled
-
cancel
public void cancel()Cancels the script execution. -
setExecution
public void setExecution(reactor.core.Disposable execution) Sets the main execution disposable for cancellation.- Parameters:
execution- the disposable to set
-
stateStore
-
instance
-
reactorScheduler
public reactor.core.scheduler.Scheduler reactorScheduler() -
eventListener
-
execution
public reactor.core.Disposable execution() -
cancelled
public boolean cancelled()
-