Class MudlibProcess

java.lang.Object
io.github.protasm.jvmud.execution.application.worker.MudlibProcess
All Implemented Interfaces:
AutoCloseable

public final class MudlibProcess extends Object implements AutoCloseable
Engine-side owner of a separate worker JVM for fault isolation. The engine never loads this mudlib's LPC classes or runtime objects. Workers run with the host account's OS permissions, not within a security sandbox.
  • Constructor Details

    • MudlibProcess

      public MudlibProcess(MudlibSpec spec, Path log, boolean trace) throws IOException
      Starts Java directly with per-worker JVM memory limits and requires readiness before returning.
      Throws:
      IOException
  • Method Details

    • ready

      public WorkerWire.Ready ready()
      Reports immutable worker readiness metadata.
    • handle

      public ProcessHandle handle()
      Worker process identity for status reporting and supervision.
    • onExit

      public CompletableFuture<Process> onExit()
      Completes when the worker exits, including an unexpected crash.
    • connectPlayer

      public Socket connectPlayer(String clientAddress) throws IOException
      Opens the authenticated private player channel and preserves the original client address.
      Throws:
      IOException
    • administration

      public AdminSession administration() throws IOException
      Opens independent command state in the worker; grants have already been checked by the engine.
      Throws:
      IOException
    • close

      public void close()
      Gives shutdown hooks a bounded opportunity, then terminates an unresponsive worker.
      Specified by:
      close in interface AutoCloseable