/** * Register an {@link com.google.gwt.inject.client.AsyncProvider} of a client-side action handler. * * @param actionType The type of that the client-side action handler supports. * @param handlerProvider The {@link com.google.gwt.inject.client.AsyncProvider} of the handler. */ protected void register(Class<?> actionType, final AsyncProvider<? extends ClientActionHandler<?, ?>> handlerProvider) { register(actionType, new IndirectProvider<ClientActionHandler<?, ?>>() { @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { handlerProvider.get(callback); } }); }
/** * Register a {@link javax.inject.Provider} of a client-side action handler. * * @param actionType The type of action that the client-side action handler supports. * @param handlerProvider The {@link com.google.inject.Provider} of the handler. */ protected void register(Class<?> actionType, final Provider<? extends ClientActionHandler<?, ?>> handlerProvider) { register(actionType, new IndirectProvider<ClientActionHandler<?, ?>>() { @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { callback.onSuccess(handlerProvider.get()); } }); }
/** * Register a {@link Provider} of a client-side action handler. * * @param actionType The type of {@link Action} that the * client-side action handler supports. * @param handlerProvider The {@link Provider} of the handler. */ protected void register(Class<? extends Action<?>> actionType, final Provider<? extends ClientActionHandler<?, ?>> handlerProvider) { register(actionType, new IndirectProvider<ClientActionHandler<?, ?>>() { @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { callback.onSuccess(handlerProvider.get()); } }); }
/** * Register an {@link AsyncProvider} of a client-side action handler. * * @param actionType The type of {@link Action} that the * client-side action handler supports. * @param handlerProvider The {@link AsyncProvider} of the handler. */ protected void register(Class<? extends Action<?>> actionType, final AsyncProvider<? extends ClientActionHandler<?, ?>> handlerProvider) { register(actionType, new IndirectProvider<ClientActionHandler<?, ?>>() { @SuppressWarnings("unchecked") @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { ((AsyncProvider<ClientActionHandler<?, ?>>) handlerProvider).get(callback); } }); }
/** * Register a client-side action handler that is part of a {@link com.gwtplatform.common.client.ProviderBundle}. * * @param actionType The type of that the client-side action handler supports. * @param bundleProvider The {@link javax.inject.Provider} of the * {@link com.gwtplatform.common.client.ProviderBundle}. * @param providerId The id of the client-side action handler provider. */ protected <B extends ProviderBundle> void register(Class<?> actionType, AsyncProvider<B> bundleProvider, int providerId) { register(actionType, new CodeSplitBundleProvider<ClientActionHandler<?, ?>, B>(bundleProvider, providerId)); }
/** * Register a instance of a client-side action handler. * * @param handler The {@link ClientActionHandler}; */ protected void register(final ClientActionHandler<?, ?> handler) { register(handler.getActionType(), new IndirectProvider<ClientActionHandler<?, ?>>() { @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { callback.onSuccess(handler); } }); }
/** * Register a instance of a client-side action handler. * * @param handler The {@link ClientActionHandler}; */ protected void register(final ClientActionHandler<?, ?> handler) { register(handler.getActionType(), new IndirectProvider<ClientActionHandler<?, ?>>() { @Override public void get(AsyncCallback<ClientActionHandler<?, ?>> callback) { callback.onSuccess(handler); } }); }
/** * Register a client-side action handler that is part of a {@link com.gwtplatform.common.client.ProviderBundle}. * * @param actionType The type of {@link Action} that the * client-side action handler supports. * @param bundleProvider The {@link Provider} of the {@link ProviderBundle}. * @param providerId The id of the client-side action handler provider. */ protected <B extends ProviderBundle> void register( Class<? extends Action<?>> actionType, AsyncProvider<B> bundleProvider, int providerId) { register(actionType, new CodeSplitBundleProvider<ClientActionHandler<?, ?>, B>( bundleProvider, providerId)); }