當前位置: 首頁>>代碼示例>>Java>>正文


Java Registration類代碼示例

本文整理匯總了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);
        }
    };
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:22,代碼來源:ContainerFactoryManager.java

示例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();
        }
    };
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:23,代碼來源:SerdesManager.java

示例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);
        }
    };
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:19,代碼來源:FilterManager.java

示例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);
        }
    };
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:19,代碼來源:FilterManager.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-databind,代碼行數:28,代碼來源:ViewEngine.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例9: registerRequestFilter

import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public Registration registerRequestFilter(RequestFilter requestFilter) {
    return filterManager.registerRequestFilter(requestFilter);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例10: registerResponseFilter

import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
@Override
public Registration registerResponseFilter(ResponseFilter responseFilter) {
    return filterManager.registerResponseFilter(responseFilter);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-http,代碼行數:5,代碼來源:RequestorImpl.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-databind,代碼行數:5,代碼來源:AbstractDatabindView.java

示例13: bind

import org.turbogwt.core.util.shared.Registration; //導入依賴的package包/類
<F> Registration bind(String id, Accessor<T, F> propertyAccessor,
Validator<T, F> validatesValue);
 
開發者ID:growbit,項目名稱:turbogwt-databind,代碼行數:3,代碼來源:PropertyBinder.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-databind,代碼行數:4,代碼來源:PresenterEngine.java

示例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);
}
 
開發者ID:growbit,項目名稱:turbogwt-databind,代碼行數:5,代碼來源:BindingImpl.java


注:本文中的org.turbogwt.core.util.shared.Registration類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。