Interface InstanceHost

All Known Implementing Classes:
MudInstance

public interface InstanceHost
Interactive operations on one hosted mudlib, independent of its player transport.
  • Method Details

    • administer

      default <T> T administer(Function<LPCRuntime, T> action)
      Executes trusted administrative work on the selected mudlib's execution queue, serialized with player dispatch and ticks. The callback must not use the runtime outside an administer call, and must not wait for network input or write to a socket.
    • mudlibRoot

      Path mudlibRoot()
    • bootResult

      MudlibBootResult bootResult()
    • worldTickInterval

      Duration worldTickInterval()
    • advanceWorldTick

      void advanceWorldTick()
    • shutdown

      void shutdown(Object reason)
    • attachPersona

      InstancePersona attachPersona(PrintWriter out, String remoteAddress)
    • bindClientProtocolSink

      default void bindClientProtocolSink(InstancePersona persona, BiConsumer<String,String> protocolOutputSink)
      Binds the transport callback used for negotiated out-of-band protocol messages.
    • setClientProtocolEnabled

      default void setClientProtocolEnabled(InstancePersona persona, String protocol, boolean enabled)
      Notifies the hosted runtime that a client protocol has been enabled or disabled.
    • receiveClientProtocolMessage

      default void receiveClientProtocolMessage(InstancePersona persona, String protocol, String message)
      Delivers one decoded-text message received over a negotiated client protocol.
    • detachPersona

      void detachPersona(InstancePersona persona)
    • dispatch

      void dispatch(InstancePersona persona, PrintWriter out, String commandLine)
      Delivers input; player-facing command meaning and responses belong to the mudlib.
    • printPromptIfReady

      void printPromptIfReady(InstancePersona persona, PrintWriter out)
    • isCapturingInput

      boolean isCapturingInput(InstancePersona persona)
    • isCapturingNoEchoInput

      boolean isCapturingNoEchoInput(InstancePersona persona)
    • isAttached

      boolean isAttached(InstancePersona persona)
    • transportControlPrefix

      default String transportControlPrefix()
      Prefix that escapes a line into transport control rather than mudlib command dispatch.