net.customware.gwt.dispatch.server
Class DefaultActionHandlerRegistry

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

public class DefaultActionHandlerRegistry
extends java.lang.Object
implements ActionHandlerRegistry


Constructor Summary
DefaultActionHandlerRegistry()
           
 
Method Summary
 void addHandler(ActionHandler<?,?> handler)
          Adds the specified ActionHandler 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.
 
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: ActionHandlerRegistry
Adds the specified ActionHandler to the registry.

Specified by:
addHandler in interface ActionHandlerRegistry
Parameters:
handler - The handler.

removeHandler

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

Specified by:
removeHandler in interface ActionHandlerRegistry
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.

clearHandlers

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

Specified by:
clearHandlers in interface ActionHandlerRegistry


Copyright © 2009 customware.net. All Rights Reserved.