Interface MessageChannel
public interface MessageChannel
Represents a pub/sub channel for cross-proxy messaging.
Channels can be either predefined system channels (see Channels) or
custom channels created by plugins via Channels.register(String, String).
Usage
// Use predefined channel
messaging.subscribe(Channels.CHAT, handler);
// Create and use custom channel
MessageChannel myChannel = Channels.register("myplugin", "events");
messaging.subscribe(myChannel, handler);
- See Also:
-
Field Summary
Fields -
Method Summary
-
Field Details
-
SYSTEM_NAMESPACE
-
-
Method Details
-
getId
Get the unique channel identifier.Format:
namespace:name(e.g., "numdrassl:heartbeat" or "myplugin:events")- Returns:
- the channel identifier
-
getNamespace
Get the namespace portion of the channel ID.- Returns:
- the namespace (e.g., "numdrassl" or plugin ID)
-
getName
Get the name portion of the channel ID.- Returns:
- the channel name within the namespace
-
isSystemChannel
default boolean isSystemChannel()Check if this is a system channel (numdrassl namespace).- Returns:
- true if this is a predefined system channel
-