P
- the type of the callbackpublic interface Advisable<P extends Callback>
Modifier and Type | Method and Description |
---|---|
<C extends P> |
get(java.lang.Class<C> callbackClass)
Returns an
Optional that contains the callback of the given type or an empty Optional if there is no registered callback with the given type. |
<C extends P> |
remove(java.lang.Class<C> callbackClass)
Removes a particular service callback.
|
<C extends P> |
set(java.lang.Class<C> callbackClass,
C callback)
Sets a particular service callback.
|
<C extends P> C set(java.lang.Class<C> callbackClass, C callback)
C
- the callback typecallbackClass
- the callback classcallback
- the callback object<C extends P> java.util.Optional<C> get(java.lang.Class<C> callbackClass)
Optional
that contains the callback of the given type or an empty Optional
if there is no registered callback with the given type.C
- the callback typecallbackClass
- the callback classOptional
that contains the callback of the given type<C extends P> C remove(java.lang.Class<C> callbackClass)
C
- the callback typecallbackClass
- the callback class