Package zendesk.core
Interface ActionHandlerRegistry
-
public interface ActionHandlerRegistry
Defines an interface for a registry ofActionHandler
objects to be used for inter-SDK actions, such as starting anandroid.app.Activity
from one SDK, in another SDK, without any dependency between them.ActionHandler
objects can be added and removed from the registry usingActionHandlerRegistry.add(ActionHandler)
andActionHandlerRegistry.remove(ActionHandler)
, respectively. A query method,ActionHandlerRegistry.findHandlerByAction(String)
, returns the highest priorityActionHandler
whoseActionHandler.canHandle(String)
returned true.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description void
add(ActionHandler actionHandler)
Adds anActionHandler
to the registry.ActionHandler
findHandlerByAction(java.lang.String actionString)
Finds and returns the highest priorityActionHandler
whoseActionHandler.canHandle(String)
method returned true for the given action String, or null if noActionHandler
s returned true.void
remove(ActionHandler actionHandler)
Removes anActionHandler
from the registry.
-
-
-
Method Detail
-
add
void add(ActionHandler actionHandler)
Adds anActionHandler
to the registry.- Parameters:
actionHandler
- the ActionHandler to add to the registry.
-
remove
void remove(ActionHandler actionHandler)
Removes anActionHandler
from the registry.- Parameters:
actionHandler
- the ActionHandler to remove from the registry.
-
findHandlerByAction
ActionHandler findHandlerByAction(java.lang.String actionString)
Finds and returns the highest priorityActionHandler
whoseActionHandler.canHandle(String)
method returned true for the given action String, or null if noActionHandler
s returned true.- Parameters:
actionString
- the action String with which to query theActionHandler
s in the registry.- Returns:
- the highest priority
ActionHandler
whoseActionHandler.canHandle(String)
method returned true, or null if noActionHandler
s returned true.
-
-