MessageCallbackMap class
A specialized callback map for handling messages from remote endpoints Supports both IPv4 and IPv6 addresses Key format:
- IPv4: "192.168.1.100:8080"
- IPv6: "
2001:db8::1:8080"
- Implementers
Constructors
Properties
Methods
-
add(
String key, MessageCallbackFunction callback) → void -
Add a callback for a specific remote endpoint
Key format: IPv4 "192.168.1.100:8080" or IPv6 "
2001:db8::1:8080" If a callback already exists for this key, it will be replaced -
addByAddress(
InternetAddress address, int port, MessageCallbackFunction callback) → void - Add a callback using InternetAddress and port
-
clear(
) → void - Clear all registered callbacks
-
containsAddress(
InternetAddress address, int port) → bool - Check if an address:port combination has registered callbacks
-
containsKey(
String key) → bool - Check if a key has registered callbacks
-
get(
String key) → MessageCallbackFunction? - Get a callback invoker for a specific remote endpoint Returns a function that invokes the registered callback for this key
-
getByAddress(
InternetAddress address, int port) → MessageCallbackFunction? - Get a callback invoker using InternetAddress and port
-
getHandler(
String key) → CallbackOnMessage? - Get a callback invoker for a specific remote endpoint Returns a function that invokes the registered callback for this key
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(
String key) → void - Remove the callback for a key
-
removeByAddress(
InternetAddress address, int port) → void - Remove all callbacks using InternetAddress and port
-
removeCallback(
String key, MessageCallbackFunction callback) → void - Remove the callback for a specific key
-
removeKey(
String key) → void - Remove athe designed key
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited