Package dev.adlin.vts4j.event
Interface Event
- All Known Implementing Classes:
BackgroundChangedEvent,HotkeyTriggeredEvent,ItemEvent,Live2DCubismEditorConnectedEvent,ModelAnimationEvent,ModelClickedEvent,ModelConfigChangedEvent,ModelLoadedEvent,ModelMovedEvent,ModelOutlineEvent,PostProcessingEvent,TestEvent,TrackingStatusChangedEvent,WebsocketCloseEvent,WebsocketErrorEvent,WebsocketOpenEvent
public interface Event
A marker interface representing the root of all system and network-driven events.
Any class that acts as a dispatchable message or data payload within the event bus must implement this interface.
To ensure integration across the entire event architecture, custom implementations should adhere to the following ecosystem requirements:
- Must be registered bidirectionally in the
EventRegistryto support JSON serialization. - Can be subscribed to via methods marked with
EventListenerinside aListenerclass. - Are dispatched synchronously by passing the instance to
EventHandler.callEvent(Event).
Example Usage:
public final class ModelLoadedEvent implements Event {
private final String modelId;
public ModelLoadedEvent(String modelId) {
this.modelId = modelId;
}
public String getModelId() {
return modelId;
}
}
- See Also: