Enum Class MudlibLifecycleEvent

java.lang.Object
java.lang.Enum<MudlibLifecycleEvent>
io.github.protasm.jvmud.engine.mudlib.MudlibLifecycleEvent
All Implemented Interfaces:
Serializable, Comparable<MudlibLifecycleEvent>, Constable

public enum MudlibLifecycleEvent extends Enum<MudlibLifecycleEvent>
Native JVMud lifecycle moments that a mudlib may map to LPC methods.

Lifecycle events are engine-owned names for moments when JVMud can call into mudlib policy or behavior. A mudlib registers interest through MudlibBoundary: either by declaring that it handles an event, or by mapping the event to a concrete mudlib method name. The method name is mudlib vocabulary; the event name is the engine contract.

No lifecycle event is globally required. If a mapping is absent, JVMud proceeds with the engine-owned operation. If a mapping is present and the target object does not define the mapped method, JVMud skips the call unless a future contract marks that event required.

Several events are defined before their full runtime delivery path exists. Those reserved events make boundary configuration explicit without forcing the engine to adopt legacy driver concepts such as applies, rooms, heartbeats, or master objects.

  • Enum Constant Details

    • OBJECT_LOADED

      public static final MudlibLifecycleEvent OBJECT_LOADED
      A mudlib object has been loaded or cloned and may initialize its own state.

      Current delivery: implemented. JVMud invokes the mapped method on the loaded or cloned object, passing one LPC argument: mixed first_load. Current compatibility passes 0 for that argument.

      Common LP245 compatibility mapping: lifecycle.object_loaded = reset.

    • OBJECT_ACTIVATED

      public static final MudlibLifecycleEvent OBJECT_ACTIVATED
      A previously existing object has been reactivated by reload, reset, or world maintenance.

      Current delivery: reserved. This event is named so mudlibs can describe the boundary they want, but JVMud does not currently invoke it.

    • OBJECT_SOURCE_MISSING

      public static final MudlibLifecycleEvent OBJECT_SOURCE_MISSING
      A shared object path was requested, no object was already registered for that path, and no source file could be found for it.

      Mudlibs can map this event to a method that receives the normalized requested object path and may return an object to satisfy that path. JVMud then binds the returned object to the requested path so later shared-object loads return the same object without asking the mudlib again. Returning LPC false lets normal source-missing failure handling continue.

      Current delivery: implemented. JVMud invokes the mapped method on the configured boundary object, passing the normalized requested object path.

      Common LP245 compatibility mapping: lifecycle.object_source_missing = compile_object.

    • OBJECT_DESTRUCTION_REQUESTED

      public static final MudlibLifecycleEvent OBJECT_DESTRUCTION_REQUESTED
      An object is about to be destroyed and the mudlib may clean up its own references.

      Current delivery: implemented. JVMud invokes the mapped method on the configured boundary object, passing the target object being destroyed. The hook's return value is advisory to the runtime destruction path.

      Common LP245 compatibility mapping: lifecycle.object_destruction_requested = prepare_destruct.

    • OBJECT_DESTROYED

      public static final MudlibLifecycleEvent OBJECT_DESTROYED
      An object has been removed from the live runtime.

      Current delivery: reserved. JVMud currently exposes the pre-destruction hook through OBJECT_DESTRUCTION_REQUESTED; this post-destruction event is named for future cleanup policies that need a separate after-the-fact notification.

    • ENTITY_ARRIVED_AT_PLACE

      public static final MudlibLifecycleEvent ENTITY_ARRIVED_AT_PLACE
      An entity has completed movement into a Place.

      Current delivery: reserved. Movement currently happens through engine containment and location APIs; this event is reserved for mudlib policy that needs to observe arrivals without defining Places as legacy rooms.

    • ENTITY_DEPARTED_FROM_PLACE

      public static final MudlibLifecycleEvent ENTITY_DEPARTED_FROM_PLACE
      An entity is leaving a Place.

      Current delivery: reserved. This event is paired with ENTITY_ARRIVED_AT_PLACE for future movement policy and notification hooks.

    • ENTITY_ADDED_TO_ENTITY

      public static final MudlibLifecycleEvent ENTITY_ADDED_TO_ENTITY
      An entity has entered another entity's containment.

      Current delivery: reserved. This is the entity-container counterpart to place movement events.

    • ENTITY_REMOVED_FROM_ENTITY

      public static final MudlibLifecycleEvent ENTITY_REMOVED_FROM_ENTITY
      An entity has left another entity's containment.

      Current delivery: reserved. This is the removal counterpart to ENTITY_ADDED_TO_ENTITY.

    • PLAYER_SESSION_CONNECTED

      public static final MudlibLifecycleEvent PLAYER_SESSION_CONNECTED
      A Session has connected and JVMud has created a Player endpoint.

      Current delivery: implemented by the server layer for hosted telnet play. The configured player object method is invoked without LPC arguments and may start login or character selection input.

      Common LP245 compatibility mapping: lifecycle.player_session_connected = logon.

    • PLAYER_SESSION_POST_REBIND

      public static final MudlibLifecycleEvent PLAYER_SESSION_POST_REBIND
      A Session has finished rebinding from one live mudlib projection to another.

      Current delivery: implemented by the hosted server path after compatibility session handoff operations such as LPC exec change the object receiving player input. JVMud invokes the configured method without LPC arguments on the newly bound object.

    • PLAYER_PERSONA_RESOLVED

      public static final MudlibLifecycleEvent PLAYER_PERSONA_RESOLVED
      Mudlib policy or JVMud fallback has resolved the Persona a Player will use.

      Current delivery: reserved. This is a Player/Session/Persona lifecycle step, not a legacy login-driver apply.

    • PLAYER_OBJECT_BOUND

      public static final MudlibLifecycleEvent PLAYER_OBJECT_BOUND
      JVMud has associated a live mudlib projection with a Player, Session, and Persona.

      Current delivery: reserved. Compatibility mudlibs that collapse account, connection, and Persona behavior into one LPC object can eventually map this event to their glue code.

    • PLAYER_ENTERED_WORLD

      public static final MudlibLifecycleEvent PLAYER_ENTERED_WORLD
      A Player's Persona has entered the world and can begin ordinary interaction.

      Current delivery: reserved. The engine already owns the attach sequence; this event is named for mudlib policy that wants an explicit post-entry notification.

    • PLAYER_SESSION_DISCONNECTED

      public static final MudlibLifecycleEvent PLAYER_SESSION_DISCONNECTED
      A Session has disconnected and JVMud is unbinding session-only routing.

      Current delivery: implemented by the server layer for hosted telnet play. The configured player object method is invoked without LPC arguments so the mudlib can save or clean up session-owned state.

      Common LP245 compatibility mapping: lifecycle.player_session_disconnected = quit.

    • INTERACTION_SCOPE_STARTED

      public static final MudlibLifecycleEvent INTERACTION_SCOPE_STARTED
      An interactive Persona's local command/perception scope is being refreshed.

      Current delivery: implemented. JVMud invokes the mapped method with no LPC arguments on the active Persona, its location, objects in that location, and objects carried by the Persona. This is where compatibility mudlibs commonly register local text commands.

      Common LP245 compatibility mapping: lifecycle.interaction_scope_started = init.

    • COMMAND_DISPATCH_STARTED

      public static final MudlibLifecycleEvent COMMAND_DISPATCH_STARTED
      JVMud is about to dispatch a Player command line to mudlib behavior.

      Current delivery: reserved. The command actor and verb are already tracked by the runtime; this event is for future mudlib policy that needs explicit before-dispatch notification.

    • COMMAND_DISPATCH_FINISHED

      public static final MudlibLifecycleEvent COMMAND_DISPATCH_FINISHED
      JVMud has finished dispatching a Player command line.

      Current delivery: reserved. This event is paired with COMMAND_DISPATCH_STARTED for future command auditing or cleanup policy.

    • LOG_ERROR

      public static final MudlibLifecycleEvent LOG_ERROR
      Compilation or load-time diagnostics should be reported to mudlib policy.

      Current delivery: implemented. JVMud invokes the mapped method on the configured boundary object with the object path and diagnostic message, then clears generated output so reporting does not leak into gameplay transcripts.

      Common LP245 compatibility mapping: lifecycle.log_error = log_error.

    • RUNTIME_ERROR

      public static final MudlibLifecycleEvent RUNTIME_ERROR
      A runtime error should be reported to mudlib policy.

      Current delivery: implemented for timed runtime errors and server-layer error handling. JVMud invokes the mapped method on the configured boundary/error handler object with details about the target, context, operation, and message.

      Common LP245 compatibility mapping: lifecycle.runtime_error = runtime_error.

    • SCHEDULED_TICK_ERROR

      public static final MudlibLifecycleEvent SCHEDULED_TICK_ERROR
      A scheduled recurring tick failed while invoking mudlib code.

      Current delivery: implemented. When a scheduled tick throws, JVMud can invoke this specialized error hook in addition to RUNTIME_ERROR.

      Common LP245 compatibility mapping: lifecycle.scheduled_tick_error = heart_beat_error.

    • SERVER_SHUTDOWN

      public static final MudlibLifecycleEvent SERVER_SHUTDOWN
      The host server is shutting down a mudlib.

      Current delivery: implemented by the server layer. JVMud invokes the mapped method on the configured boundary/error handler object, passing the shutdown reason.

      Common LP245 compatibility mapping: lifecycle.server_shutdown = notify_shutdown.

    • SCHEDULED_TICK

      public static final MudlibLifecycleEvent SCHEDULED_TICK
      The engine scheduler is delivering deterministic recurring time to an object.

      Current delivery: implemented through the temporal tick configuration rather than through a per-event method mapping. The mudlib boundary chooses the recurring tick method name and default interval; compatibility shims may expose legacy names such as set_heart_beat on top of that scheduler.

    • DEFERRED_CALLBACK

      public static final MudlibLifecycleEvent DEFERRED_CALLBACK
      A previously requested one-shot deferred callback is due.

      Current delivery: reserved as a named lifecycle event, while concrete delayed callbacks are currently scheduled with explicit callback method names through runtime efuns.

  • Method Details

    • values

      public static MudlibLifecycleEvent[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MudlibLifecycleEvent valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null