Package zendesk.core
Interface ActionHandlerRegistry
-
public interface ActionHandlerRegistryDefines an interface for a registry ofActionHandlerobjects to be used for inter-SDK actions, such as starting anandroid.app.Activityfrom one SDK, in another SDK, without any dependency between them.ActionHandlerobjects can be added and removed from the registry usingActionHandlerRegistry.add(ActionHandler)andActionHandlerRegistry.remove(ActionHandler), respectively. A query method,ActionHandlerRegistry.findHandlerByAction(String), returns the highest priorityActionHandlerwhoseActionHandler.canHandle(String)returned true.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidadd(ActionHandler actionHandler)Adds anActionHandlerto the registry.ActionHandlerfindHandlerByAction(java.lang.String actionString)Finds and returns the highest priorityActionHandlerwhoseActionHandler.canHandle(String)method returned true for the given action String, or null if noActionHandlers returned true.voidremove(ActionHandler actionHandler)Removes anActionHandlerfrom the registry.
-
-
-
Method Detail
-
add
void add(ActionHandler actionHandler)
Adds anActionHandlerto the registry.- Parameters:
actionHandler- the ActionHandler to add to the registry.
-
remove
void remove(ActionHandler actionHandler)
Removes anActionHandlerfrom the registry.- Parameters:
actionHandler- the ActionHandler to remove from the registry.
-
findHandlerByAction
ActionHandler findHandlerByAction(java.lang.String actionString)
Finds and returns the highest priorityActionHandlerwhoseActionHandler.canHandle(String)method returned true for the given action String, or null if noActionHandlers returned true.- Parameters:
actionString- the action String with which to query theActionHandlers in the registry.- Returns:
- the highest priority
ActionHandlerwhoseActionHandler.canHandle(String)method returned true, or null if noActionHandlers returned true.
-
-