Package me.internalizable.numdrassl.api.messaging.annotation
package me.internalizable.numdrassl.api.messaging.annotation
Annotation-based API for cross-proxy message subscriptions.
Important: Use @MessageSubscribe for cross-proxy messaging.
Do not confuse with @Subscribe from api.event which is for local events.
Provides a declarative alternative to programmatic subscriptions:
MessageSubscribe- Marks methods as cross-proxy message handlersTypeAdapter- Custom serialization for payloads
Usage
@Plugin(id = "my-plugin", name = "My Plugin", version = "1.0.0")
public class MyPlugin {
@MessageSubscribe(channel = "scores")
public void onScore(ScoreData data) {
// Handle cross-proxy plugin message
}
@MessageSubscribe(SystemChannel.HEARTBEAT)
public void onHeartbeat(HeartbeatMessage msg) {
// Handle cross-proxy system message
}
}
- See Also:
-
ClassDescriptionMarks a method as a cross-proxy message subscriber.TypeAdapter<T>Interface for custom type adapters used in message serialization.