Examples of ProxySerializer


Examples of com.google.web.bindery.requestfactory.shared.ProxySerializer

   */
  protected <T extends BaseProxy> T checkSerialization(T proxy) {
    AutoBean<T> originalBean = AutoBeanUtils.getAutoBean(proxy);
    SimpleProxyId<T> id = BaseProxyCategory.stableId(originalBean);
    DefaultProxyStore store = new DefaultProxyStore();
    ProxySerializer s = req.getSerializer(store);

    String key = s.serialize(proxy);
    assertNotNull(key);

    // Use a new instance
    store = new DefaultProxyStore(store.encode());
    s = req.getSerializer(store);
    T restored = s.deserialize(id.getProxyClass(), key);
    AutoBean<? extends BaseProxy> restoredBean = AutoBeanUtils.getAutoBean(restored);
    assertNotSame(proxy, restored);
    /*
     * Performing a regular assertEquals() or even an AutoBeanUtils.diff() here
     * is wrong. If any of the objects in the graph are unpersisted, it's
View Full Code Here

Examples of tr.gov.tcmb.spring.serialization.ProxySerializer

  public static Object createComponentWrapper(Class<?> componentClass,
      String componentId, ClassLoader classLoader) {
    TargetSource targetSource = new ComponentTargetSource(componentClass,
        componentId);
    ProxySerializer serializer = new ViewComponentSerializer(
        componentClass, componentId);

    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setTargetSource(targetSource);
    proxyFactory.setProxyTargetClass(true);
View Full Code Here

Examples of tr.gov.tcmb.spring.serialization.ProxySerializer

  private final Log logger = LogFactory.getLog(getClass());

  @Override
  public Object getAutowireValue(DependencyDescriptor descriptor,
      ClassLoader classLoader) {
    ProxySerializer serializer = new CurrentFacesContextSerializer();
    ProxyFactory proxyFactory = new ProxyFactory();
    proxyFactory.setTargetSource(new FacesContextTargetSource());
    proxyFactory.setProxyTargetClass(true);
    ProxySerializerHelper.register(proxyFactory, serializer);
    proxyFactory.setFrozen(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.