T - the type of objects that can be registeredpublic interface Registry<T> extends java.lang.Iterable<Registration<? extends T>>
Selectors to map their objects.| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the
Registry, resetting its state and calling Registration.cancel() for any active Registration. |
Registration<T> |
register(Selector sel,
T obj)
Assign the given
Selector with the given object. |
java.util.List<Registration<? extends T>> |
select(java.lang.Object key)
|
boolean |
unregister(java.lang.Object key)
Remove any objects matching this
key. |
Registration<T> register(Selector sel, T obj)
Selector with the given object.sel - The left-hand side of the Selector comparison check.obj - The object to assign.boolean unregister(java.lang.Object key)
key. This will unregister all objects matching the given
key. There's no provision for removing only a specific object.key - The key to be matched by the Selectorsjava.util.List<Registration<? extends T>> select(java.lang.Object key)
key - The key for the Selectors to matchList of Registrations whose Selector matches the given key.void clear()
Registry, resetting its state and calling Registration.cancel() for any active Registration.