MessageCallbackMapSingleton class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
keys
→ Iterable<String>
-
Get all keys with registered callbacks
no setterinherited
-
length
→ int
-
Get the number of registered callback keys
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
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
inherited
-
addByAddress(InternetAddress address, int port, MessageCallbackFunction callback)
→ void
-
Add a callback using InternetAddress and port
inherited
-
clear()
→ void
-
Clear all registered callbacks
inherited
-
containsAddress(InternetAddress address, int port)
→ bool
-
Check if an address:port combination has registered callbacks
inherited
-
containsKey(String key)
→ bool
-
Check if a key has registered callbacks
inherited
-
get(String key)
→ MessageCallbackFunction?
-
Get a callback invoker for a specific remote endpoint
Returns a function that invokes the registered callback for this key
inherited
-
getByAddress(InternetAddress address, int port)
→ MessageCallbackFunction?
-
Get a callback invoker using InternetAddress and port
inherited
-
getHandler(String key)
→ CallbackOnMessage?
-
Get a callback invoker for a specific remote endpoint
Returns a function that invokes the registered callback for this key
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
remove(String key)
→ void
-
Remove the callback for a key
inherited
-
removeByAddress(InternetAddress address, int port)
→ void
-
Remove all callbacks using InternetAddress and port
inherited
-
removeCallback(String key, MessageCallbackFunction callback)
→ void
-
Remove the callback for a specific key
inherited
-
removeKey(String key)
→ void
-
Remove athe designed key
inherited
-
toString()
→ String
-
A string representation of this object.
inherited
Static Methods
-
destroy()
→ void
-
Destroys the singleton instance