|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.customware.gwt.dispatch.server.LazyActionHandlerRegistry
public class LazyActionHandlerRegistry
This is a lazy-loading implementation of the registry. It will only create
action handlers when they are first used. All ActionHandler
implementations must have a public, default constructor.
| Constructor Summary | |
|---|---|
LazyActionHandlerRegistry()
|
|
| Method Summary | ||
|---|---|---|
|
addHandlerClass(Class<A> actionClass,
Class<? extends ActionHandler<A,R>> handlerClass)
Registers the specified ActionHandler class with the registry. |
|
void |
clearHandlers()
Clears all registered handlers from the registry. |
|
protected ActionHandler<?,?> |
createInstance(Class<? extends ActionHandler<?,?>> handlerClass)
|
|
|
findHandler(A action)
Searches the registry and returns the first handler which supports the specied action, or null if none is available. |
|
|
removeHandlerClass(Class<A> actionClass,
Class<? extends ActionHandler<A,R>> handlerClass)
Removes any registration of the specified class, as well as any instances which have been created. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LazyActionHandlerRegistry()
| Method Detail |
|---|
public <A extends Action<R>,R extends Result> void addHandlerClass(Class<A> actionClass,
Class<? extends ActionHandler<A,R>> handlerClass)
ClassActionHandlerRegistryActionHandler class with the registry.
The class will only
addHandlerClass in interface ClassActionHandlerRegistryactionClass - The action class the handler handles.handlerClass - The handler class.
public <A extends Action<R>,R extends Result> void removeHandlerClass(Class<A> actionClass,
Class<? extends ActionHandler<A,R>> handlerClass)
ClassActionHandlerRegistry
removeHandlerClass in interface ClassActionHandlerRegistrypublic <A extends Action<R>,R extends Result> ActionHandler<A,R> findHandler(A action)
ActionHandlerRegistrynull if none is available.
findHandler in interface ActionHandlerRegistryaction - The action.
protected ActionHandler<?,?> createInstance(Class<? extends ActionHandler<?,?>> handlerClass)
public void clearHandlers()
ActionHandlerRegistry
clearHandlers in interface ActionHandlerRegistry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||