本文整理匯總了Java中org.turbogwt.core.util.shared.Registration類的典型用法代碼示例。如果您正苦於以下問題:Java Registration類的具體用法?Java Registration怎麽用?Java Registration使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Registration類屬於org.turbogwt.core.util.shared包,在下文中一共展示了Registration類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: registerFactory
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
/**
* Map a {@link Factory} to some collection class.
*
* @param type The type of the collection
* @param factory The factory of the collection
* @param <C> The type of the collection
*
* @return The {@link org.turbogwt.core.util.shared.Registration} object, capable of cancelling this registration
* to the {@link ContainerFactoryManager}
*/
public <C extends Collection> Registration registerFactory(Class<C> type, Factory<C> factory) {
final String typeName = type.getName();
factories.put(typeName, factory);
return new Registration() {
@Override
public void removeHandler() {
factories.remove(typeName);
}
};
}
示例2: registerSerdes
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
/**
* Register a serializer/deserializer of the given type.
*
* @param type The class of the serializer/deserializer's type.
* @param serdes The serializer/deserializer of T.
* @param <T> The type of the object to be serialized/deserialized.
*
* @return The {@link Registration} object, capable of cancelling this registration
* to the {@link SerdesManager}.
*/
public <T> Registration registerSerdes(Class<T> type, Serdes<T> serdes) {
final Registration desReg = registerDeserializer(type, serdes);
final Registration serReg = registerSerializer(type, serdes);
return new Registration() {
@Override
public void removeHandler() {
desReg.removeHandler();
serReg.removeHandler();
}
};
}
示例3: registerRequestFilter
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
/**
* Register a request filter.
*
* @param requestFilter The request filter to be registered.
*
* @return The {@link org.turbogwt.core.util.shared.Registration} object, capable of cancelling this registration
* to the {@link FilterManager}.
*/
public Registration registerRequestFilter(final RequestFilter requestFilter) {
addRequestFilter(requestFilter);
return new Registration() {
@Override
public void removeHandler() {
removeRequestFilter(requestFilter);
}
};
}
示例4: registerResponseFilter
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
/**
* Register a response filter.
*
* @param responseFilter The response filter to be registered.
*
* @return The {@link Registration} object, capable of cancelling this registration
* to the {@link FilterManager}.
*/
public Registration registerResponseFilter(final ResponseFilter responseFilter) {
addResponseFilter(responseFilter);
return new Registration() {
@Override
public void removeHandler() {
removeResponseFilter(responseFilter);
}
};
}
示例5: bind
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <F> Registration bind(final String id, final HasValue<F> widget, Strategy strategy) {
assert widget instanceof IsWidget : "HasValue parameter must be of type IsWidget";
// Add update handler
HandlerRegistration handlerRegistration = strategy.bind((IsWidget) widget, new Command() {
@Override
public void execute() {
fireValueChangeEvent(id, widget);
}
});
if (bindings.containsKey(id)) {
// If id were already bound, then update the binding
WidgetBinding widgetBinding = bindings.get(id);
if (widgetBinding.widgetHandlerRegistration != null) {
// Remove previous existing handler avoiding memory leak
widgetBinding.widgetHandlerRegistration.removeHandler();
}
widgetBinding.widget = widget;
widgetBinding.widgetHandlerRegistration = handlerRegistration;
} else {
WidgetBinding widgetBinding = new WidgetBinding(widget, handlerRegistration);
bindings.put(id, widgetBinding);
}
return BinderRegistration.of(this, id);
}
示例6: registerDeserializer
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <T> Registration registerDeserializer(Class<T> type, Deserializer<T> deserializer) {
return serdesManager.registerDeserializer(type, deserializer);
}
示例7: registerSerializer
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <T> Registration registerSerializer(Class<T> type, Serializer<T> serializer) {
return serdesManager.registerSerializer(type, serializer);
}
示例8: registerSerdes
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <T> Registration registerSerdes(Class<T> type, Serdes<T> serdes) {
return serdesManager.registerSerdes(type, serdes);
}
示例9: registerRequestFilter
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public Registration registerRequestFilter(RequestFilter requestFilter) {
return filterManager.registerRequestFilter(requestFilter);
}
示例10: registerResponseFilter
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public Registration registerResponseFilter(ResponseFilter responseFilter) {
return filterManager.registerResponseFilter(responseFilter);
}
示例11: registerContainerFactoy
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <C extends Collection> Registration registerContainerFactoy(Class<C> collectionType, Factory<C> factory) {
return collectionFactoryManager.registerFactory(collectionType, factory);
}
示例12: bind
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <F> Registration bind(String id, HasValue<F> widget, Strategy strategy) {
return engine.bind(id, widget, strategy);
}
示例13: bind
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
<F> Registration bind(String id, Accessor<T, F> propertyAccessor,
Validator<T, F> validatesValue);
示例14: bind
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
public <F> Registration bind(String id, Accessor<T, F> propertyAccessor) {
return bind(true, id, propertyAccessor);
}
示例15: bind
import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public <F> Registration bind(String id, Accessor<T, F> propertyAccessor) {
return engine.bind(id, propertyAccessor);
}