Package org.impalaframework.util.serialize

Examples of org.impalaframework.util.serialize.SerializationHelper.clone()


  Object clone(Object o) {
    final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
    final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
    SerializationHelper helper = new SerializationHelper(streamFactory);
    final Object clone = helper.clone((Serializable) o);
    return clone;
  }

  SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
    return new ClassLoaderAwareSerializationStreamFactory(classLoader);
View Full Code Here


    Object clone(Object o) {
        final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
        final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
        SerializationHelper helper = new SerializationHelper(streamFactory);
        final Object clone = helper.clone((Serializable) o);
        return clone;
    }

    SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
        return new ClassLoaderAwareSerializationStreamFactory(classLoader);
View Full Code Here

  Object clone(Object o) {
    final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
    final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
    SerializationHelper helper = new SerializationHelper(streamFactory);
    final Object clone = helper.clone((Serializable) o);
    return clone;
  }

  SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
    return new ClassLoaderAwareSerializationStreamFactory(classLoader);
View Full Code Here

       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
        session.setAttribute(eq("myAttribute"), EasyMock.anyObject());
       
        replay(session);
View Full Code Here

       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
        session.removeAttribute("myAttribute");
       
        replay(session);
View Full Code Here

       
        session = createMock(HttpSession.class);
        SerializableValueHolder valueHolder = new SerializableValueHolder();
        SerializationHelper helper = new SerializationHelper(new ClassLoaderAwareSerializationStreamFactory(newModuleClassLoader()));
       
        Object clonedObject = helper.clone(valueHolder);
        expect(session.getAttribute("myAttribute")).andReturn(clonedObject);
       
        //note the call to invalidate
        session.invalidate();
       
View Full Code Here

    Object clone(Object o) {
        final BundleDelegatingClassLoader classLoader = BundleDelegatingClassLoader.createBundleClassLoaderFor(bundleContext.getBundle());
        final SerializationStreamFactory streamFactory = newStreamFactory(classLoader);
        SerializationHelper helper = new SerializationHelper(streamFactory);
        final Object clone = helper.clone((Serializable) o);
        return clone;
    }

    SerializationStreamFactory newStreamFactory(ClassLoader classLoader) {
        return new ClassLoaderAwareSerializationStreamFactory(classLoader);
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.