Class ReactiveScriptContext

java.lang.Object
com.soulfiremc.server.script.ReactiveScriptContext

public final class ReactiveScriptContext extends Object
Reactive execution context for scripts. Per-invocation state (output sinks) lives in ExecutionRun, not here.
  • Constructor Details

    • ReactiveScriptContext

      public ReactiveScriptContext(InstanceManager instance, ScriptEventListener eventListener)
      Creates a new reactive script context.
      Parameters:
      instance - the SoulFire instance
      eventListener - listener for script execution events
  • Method Details

    • scheduler

      public SoulFireScheduler scheduler()
    • log

      public void log(String level, String message)
    • 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

      public ScriptStateStore stateStore()
    • instance

      public InstanceManager instance()
    • reactorScheduler

      public reactor.core.scheduler.Scheduler reactorScheduler()
    • eventListener

      public ScriptEventListener eventListener()
    • execution

      public reactor.core.Disposable execution()
    • cancelled

      public boolean cancelled()