Examples of deserializeAttributes()


Examples of de.javakaffee.web.msm.SessionAttributesTranscoder.deserializeAttributes()

        final MemcachedBackupSession memcachedBackupSession = new MemcachedBackupSession();
        final Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put( "test", value );

        byte[] data = transcoder.serializeAttributes( memcachedBackupSession, attributes );
        final Map<String, Object> deserializeAttributes = transcoder.deserializeAttributes( data );

        final Object actual = deserializeAttributes.get( "test" );
        assertNotNull(actual);
        assertDeepEquals(actual, value);
View Full Code Here

Examples of de.javakaffee.web.msm.SessionAttributesTranscoder.deserializeAttributes()

        // create same class with second field
        final ClassLoader loaderForCustomClassInVersion2 = ClassGenerationUtil.makeClassLoaderForCustomClass( this.getClass().getClassLoader(), TEST_TYPE_CLASS_NAME, "field1", "field2" );
        final SessionAttributesTranscoder secondTranscoder = new KryoTranscoderFactory().createTranscoder( loaderForCustomClassInVersion2 );

        // this should lead to an exception
        secondTranscoder.deserializeAttributes( data );
    }

    private static Object makeValueInstance( ClassLoader loaderForCustomClass ) {
        try {
            Class<?> forName = Class.forName( TEST_TYPE_CLASS_NAME, true, loaderForCustomClass );
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.