Package com.teamdev.jxbrowser.callback
Interface Advisable<P extends Callback>
- Type Parameters:
P
- the type of the callback
- All Known Subinterfaces:
Browser
,MediaDevices
,Navigation
,Network
,Permissions
,Plugins
public interface Advisable<P extends Callback>
A common interface that all objects providing callbacks must implement.
-
Method Details
-
set
Sets a particular service callback.Replaces the existing
callback
associated with thecallbackClass
, if any.- Type Parameters:
C
- the callback type- Parameters:
callbackClass
- the callback classcallback
- the callback object- Returns:
- the previously configured callback
-
get
Returns anOptional
that contains the callback of the given type or an emptyOptional
if there is no registered callback with the given type.- Type Parameters:
C
- the callback type- Parameters:
callbackClass
- the callback class- Returns:
- an
Optional
that contains the callback of the given type
-
remove
Removes a particular service callback.- Type Parameters:
C
- the callback type- Parameters:
callbackClass
- the callback class- Returns:
- the removed callback object
-