Class MudlibBoundary
The paths recorded here point to mudlib objects that perform translation. This class does not implement legacy LP engine behavior and does not define engine concepts using legacy names.
Lifecycle hooks are registered here as mappings from MudlibLifecycleEvent values to
mudlib method names. The event is the JVMud-native contract; the method name is mudlib policy.
For example, an LP245 compatibility boundary can map MudlibLifecycleEvent.OBJECT_LOADED
to reset and MudlibLifecycleEvent.INTERACTION_SCOPE_STARTED to init
without making those legacy method names part of the engine ontology.
A mapping is optional. When an event occurs and no method is configured, JVMud skips the mudlib call and continues the engine-owned operation. When a method is configured, the runtime invokes it on the event's target object or on the configured boundary object, depending on the event definition.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionReturns the optional object path for a general mudlib boundary adapter.static MudlibBoundary.Builderbuilder()Starts a builder for immutable mudlib boundary metadata.Returns configured function-like preprocessor compatibility probes.Returns the optional JVMud compatibility global function object path.Returns the optional filesystem source for the JVMud compatibility global object.Returns preprocessor predefines supplied by a mudlib compatibility profile.Returns the optional JDBC URL used by JVMud-native database efuns.Returns the optional JDBC password used by JVMud-native database efuns.Returns the optional JDBC user used by JVMud-native database efuns.booleandeclared()Returns whether any boundary value was declared.static MudlibBoundaryempty()Returns a boundary with no declared mudlib integration points.engineFunction(String mudlibName) Returns the JVMud-native engine function name for a mudlib-visible spelling, if one is declared.Returns engine function name translations declared by this mudlib boundary.gameId()Returns the optional stable game id declared by the mudlib.gameName()Returns the optional display name declared by the mudlib.booleanhandles(MudlibLifecycleEvent event) Returns whether the mudlib declares any interest in an event.Returns the optional starting place object path for new local Personas.Returns lifecycle events the mudlib has declared interest in handling.Returns the configured mudlib method for an event, if one was declared.Returns explicit lifecycle event-to-method mappings declared by the mudlib.intReturns the configured maximum output line length before whitespace wrapping is attempted.Deprecated.Returns the optional mudlib-owned global function object path.Returns the optional filesystem root used to resolve mudlib-absolute LPC paths.Returns the optional LPC player object path used when binding interactive sessions.Returns the optional prompt text to display when an interactive player can enter commands.Returns the optional mudlib-relative file that lists startup preload objects.Returns additional mudlib object paths to preload at startup.booleanReturns whether command prompts should be preceded by a visual line-length ruler.Returns the configured wall-clock interval for one world tick, orDuration.ZEROwhen disabled.intReturns the configured temporal tick interval in whole seconds, or0when disabled.Returns the optional mudlib method to invoke for deterministic temporal ticks.
-
Field Details
-
DEFAULT_MAX_LINE_LENGTH
public static final int DEFAULT_MAX_LINE_LENGTH- See Also:
-
MIN_MAX_LINE_LENGTH
public static final int MIN_MAX_LINE_LENGTH- See Also:
-
MAX_MAX_LINE_LENGTH
public static final int MAX_MAX_LINE_LENGTH- See Also:
-
-
Method Details
-
empty
Returns a boundary with no declared mudlib integration points. -
builder
Starts a builder for immutable mudlib boundary metadata. -
gameId
-
gameName
-
mudlibRootPath
-
boundaryObjectPath
-
mudlibGlobalObjectPath
-
compatibilityGlobalObjectPath
-
compatibilityGlobalObjectSourcePath
Returns the optional filesystem source for the JVMud compatibility global object.This is usually discovered from a
jvmud.cfile that sits beside the mudlib manifest. It lets the compiler inspect that profile-side helper object's declarations even when the upstream mudlib source root lives in a different folder. -
mfunObjectPath
Deprecated.Returns the optional object path for legacy mudlib function adapters. -
playerObjectPath
-
playerPrompt
-
maxLineLength
public int maxLineLength()Returns the configured maximum output line length before whitespace wrapping is attempted. -
showRuler
public boolean showRuler()Returns whether command prompts should be preceded by a visual line-length ruler. -
initialPlacePath
-
preloadFilePath
-
preloadObjectPaths
-
databaseJdbcUrl
-
databaseUser
-
databasePassword
-
temporalTickMethod
-
temporalTickInterval
Returns the configured wall-clock interval for one world tick, orDuration.ZEROwhen disabled. -
temporalTickIntervalSeconds
public int temporalTickIntervalSeconds()Returns the configured temporal tick interval in whole seconds, or0when disabled. -
lifecycleEvents
Returns lifecycle events the mudlib has declared interest in handling.This set includes events declared with
MudlibBoundary.Builder.handle(MudlibLifecycleEvent)and events that have explicit method mappings throughMudlibBoundary.Builder.lifecycleMethod(MudlibLifecycleEvent, String). A declared event without a method mapping is useful as boundary metadata, but JVMud can only invoke hooks that also have a mapped method.- Returns:
- immutable lifecycle event declarations
-
lifecycleMethods
Returns explicit lifecycle event-to-method mappings declared by the mudlib.Keys are JVMud-native event names. Values are LPC method names to invoke when those events are delivered.
- Returns:
- immutable map from lifecycle event to mudlib method name
-
engineFunctionAliases
Returns engine function name translations declared by this mudlib boundary.Keys are mudlib-visible function spellings used by mudlib source, and values are JVMud-native engine efun names. This keeps legacy vocabulary at the compatibility boundary instead of adding those names to the engine efun catalog.
- Returns:
- immutable map from mudlib-visible function name to JVMud engine function name
-
engineFunction
-
compatibilityPredefines
Returns preprocessor predefines supplied by a mudlib compatibility profile.These are compile-time facts exposed to LPC source before parsing. They are intended for driver-compatibility shims, such as LDMud-flavored version macros that imported mudlibs probe with
__VERSION_MAJOR__. JVMud keeps them at the mudlib boundary instead of treating another driver's predefined macro vocabulary as JVMud-native LPC.- Returns:
- immutable map from predefined macro name to replacement text
-
compatibilityFunctionPredefines
Returns configured function-like preprocessor compatibility probes.The outer key is the macro name exposed to mudlib source. The inner key is the first argument spelling, and the inner value is replacement source text. This supports driver compatibility probes without baking another driver's macro names into JVMud's compiler.
- Returns:
- immutable map from macro name to argument-specific replacement text
-
lifecycleMethod
Returns the configured mudlib method for an event, if one was declared.- Parameters:
event- lifecycle event to inspect- Returns:
- configured mudlib method name, or empty when the event has no method mapping
- Throws:
NullPointerException- ifeventisnull
-
handles
Returns whether the mudlib declares any interest in an event.This is broader than
lifecycleMethod(MudlibLifecycleEvent): it is true for both a bare event declaration and an explicit event-to-method mapping.- Parameters:
event- lifecycle event to inspect- Returns:
- true when the event was declared or mapped
- Throws:
NullPointerException- ifeventisnull
-
declared
public boolean declared()Returns whether any boundary value was declared.
-
compatibilityGlobalObjectPath().