net.customware.gwt.dispatch.server
Class DefaultActionHandlerRegistry

java.lang.Object
  extended by net.customware.gwt.dispatch.server.DefaultActionHandlerRegistry
All Implemented Interfaces:
ActionHandlerRegistry, InstanceActionHandlerRegistry

public class DefaultActionHandlerRegistry
extends Object
implements InstanceActionHandlerRegistry


Constructor Summary
DefaultActionHandlerRegistry()
           
 
Method Summary
 void addHandler(ActionHandler<?,?> handler)
          Adds the specified handler instance to the registry.
 void clearHandlers()
          Clears all registered handlers from the registry.
<A extends Action<R>,R extends Result>
ActionHandler<A,R>
findHandler(A action)
          Searches the registry and returns the first handler which supports the specied action, or null if none is available.
 boolean removeHandler(ActionHandler<?,?> handler)
          Removes the specified handler.
 void setActionHandlers(List<ActionHandler<?,?>> actionHandlers)
          Sets the specified actionHandlers as the only action handler held by this registry instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultActionHandlerRegistry

public DefaultActionHandlerRegistry()
Method Detail

addHandler

public void addHandler(ActionHandler<?,?> handler)
Description copied from interface: InstanceActionHandlerRegistry
Adds the specified handler instance to the registry.

Specified by:
addHandler in interface InstanceActionHandlerRegistry
Parameters:
handler - The action handler.

removeHandler

public boolean removeHandler(ActionHandler<?,?> handler)
Description copied from interface: InstanceActionHandlerRegistry
Removes the specified handler.

Specified by:
removeHandler in interface InstanceActionHandlerRegistry
Parameters:
handler - The handler.
Returns:
true if the handler was previously registered and was successfully removed.

findHandler

public <A extends Action<R>,R extends Result> ActionHandler<A,R> findHandler(A action)
Description copied from interface: ActionHandlerRegistry
Searches the registry and returns the first handler which supports the specied action, or null if none is available.

Specified by:
findHandler in interface ActionHandlerRegistry
Parameters:
action - The action.
Returns:
The handler.

setActionHandlers

public void setActionHandlers(List<ActionHandler<?,?>> actionHandlers)
Sets the specified actionHandlers as the only action handler held by this registry instance

Parameters:
actionHandlers - the list of action handler to set

clearHandlers

public void clearHandlers()
Description copied from interface: ActionHandlerRegistry
Clears all registered handlers from the registry.

Specified by:
clearHandlers in interface ActionHandlerRegistry


Copyright © 2011 customware.net. All Rights Reserved.