|
GWTP Dispatch client 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gwtplatform.dispatch.client.actionhandler.DefaultClientActionHandlerRegistry
public class DefaultClientActionHandlerRegistry
The default implementation that ClientActionHandlerRegistry
that if
bound will not load any client-side action handlers.
register(com.gwtplatform.dispatch.client.actionhandler.ClientActionHandler, ?>)
in the constructor.
public class MyActionHandlerRegistry extends
DefaultClientActionHandlerRegistry {
@Inject
public ClientActionHandlerRegistry(
final RetrieveFooClientActionHandler handler,
final Provider<ListFooClientActionHandler> provider,
final AsyncProvider<UpdateFooClientActionHandler> asyncProvider,
final AsyncProvider<CreateFooBundle> fooCreateBundle) {
register(handler);
register(ListFooClientAction.class, provider);
register(UpdateFooClientAction.class, asyncProvider);
register(CreateFooClientAction.class, fooCreateBundle,
CreateFooBundle.ID_CreateFooClientActionHandler);
}
// Provider Bundle that will try to combine the presenter and
// client action handler into the same split point.
public class CreateFooBundle extends ProviderBundle {
public static final int ID_CreateFooPresenter = 0;
public static final int ID_CreateFooClientActionHandler = 1;
@Inject
public CreateFooBundle(
Provider<CreateFooPresenterImpl> presenter,
Provider<CreateFooClientActionHandler> clientActionHandler) {
super(2);
providers[ID_CreateFooPresenter] = presenter;
providers[ID_CreateFooClientActionHandler] = clientActionHandler;
}
}
Constructor Summary | |
---|---|
DefaultClientActionHandlerRegistry()
|
Method Summary | ||
---|---|---|
|
find(Class<A> actionClass)
Gets the client-side action handler that supports the specific action. |
|
protected void |
register(Class<? extends Action<?>> actionType,
com.google.gwt.inject.client.AsyncProvider<? extends ClientActionHandler<?,?>> handlerProvider)
Register an AsyncProvider of a client-side action handler. |
|
protected
|
register(Class<? extends Action<?>> actionType,
com.google.gwt.inject.client.AsyncProvider<B> bundleProvider,
int providerId)
Register a client-side action handler that is part of a ProviderBundle . |
|
protected void |
register(Class<? extends Action<?>> actionType,
IndirectProvider<ClientActionHandler<?,?>> handlerProvider)
Register an IndirectProvider of a client-side action handler. |
|
protected void |
register(Class<? extends Action<?>> actionType,
com.google.inject.Provider<? extends ClientActionHandler<?,?>> handlerProvider)
Register a Provider of a client-side action handler. |
|
protected void |
register(ClientActionHandler<?,?> handler)
Register a instance of a client-side action handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultClientActionHandlerRegistry()
Method Detail |
---|
protected void register(ClientActionHandler<?,?> handler)
handler
- The ClientActionHandler
;protected void register(Class<? extends Action<?>> actionType, com.google.inject.Provider<? extends ClientActionHandler<?,?>> handlerProvider)
Provider
of a client-side action handler.
actionType
- The type of Action
that the
client-side action handler supports.handlerProvider
- The Provider
of the handler.protected void register(Class<? extends Action<?>> actionType, com.google.gwt.inject.client.AsyncProvider<? extends ClientActionHandler<?,?>> handlerProvider)
AsyncProvider
of a client-side action handler.
actionType
- The type of Action
that the
client-side action handler supports.handlerProvider
- The AsyncProvider
of the handler.protected <B extends ProviderBundle> void register(Class<? extends Action<?>> actionType, com.google.gwt.inject.client.AsyncProvider<B> bundleProvider, int providerId)
ProviderBundle
.
actionType
- The type of Action
that the
client-side action handler supports.bundleProvider
- The Provider
of the ProviderBundle
.providerId
- The id of the client-side action handler provider.protected void register(Class<? extends Action<?>> actionType, IndirectProvider<ClientActionHandler<?,?>> handlerProvider)
IndirectProvider
of a client-side action handler.
handlerProvider
- The IndirectProvider
.public <A extends Action<R>,R extends Result> IndirectProvider<ClientActionHandler<?,?>> find(Class<A> actionClass)
ClientActionHandlerRegistry
find
in interface ClientActionHandlerRegistry
null
if no
appropriate client-side action handler could be found.
|
GWTP Dispatch client 0.6-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |