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.handlerByAction(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.voidclear()Removes allActionHandlers from the registry.ActionHandlerhandlerByAction(java.lang.String actionName)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.
-
clear
void clear()
Removes allActionHandlers from the registry.
-
handlerByAction
ActionHandler handlerByAction(java.lang.String actionName)
Finds and returns the highest priorityActionHandlerwhoseActionHandler.canHandle(String)method returned true for the given action String, or null if noActionHandlers returned true.- Parameters:
actionName- 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.
-
-