Package com.ovea.jetty.session.serializer.jboss.serial.persister

Examples of com.ovea.jetty.session.serializer.jboss.serial.persister.Persister


    public boolean doneReplacing(ObjectsCache cache, Object newObject, Object oldObject, ClassMetaData oldMetaData) throws IOException {
        return (newObject == null || newObject == oldObject || newObject.getClass() == oldMetaData.getClazz());
    }

    public void writeObject(JBossSeralizationOutputInterface output, ObjectsCache cache, ClassMetaData metadata, Object obj) throws IOException {
        Persister persister = PersistResolver.resolvePersister(obj, metadata);
        output.writeByte(persister.getId());
        persister.writeData(metadata, cache.getOutput(), obj, cache.getSubstitution());
    }
View Full Code Here


    }

    public Object readObject(JBossSeralizationInputInterface input, ObjectsCache cache, StreamingClass streamingClass, int reference) throws IOException {
        ClassMetaData metaData = streamingClass.getMetadata();
        byte persisterId = input.readByte();
        Persister persister = PersistResolver.resolvePersister(persisterId);

        //Persister persister = PersistResolver.resolvePersister(description.getMetaData().getClazz(),
        //        description.getMetaData(),description.getMetaData().isArray());

        /*ObjectDescription description = new ObjectDescription();
       description.setMetaData(ClassMetamodelFactory.getClassMetaData(reference.getClassName(),cache.getLoader(),false));
       cache.putObjectInCache(reference,description); */

        Object value = persister.readData(cache.getLoader(), streamingClass, metaData, reference, cache, cache.getInput(), cache.getSubstitution());

        if (!(persister instanceof ClassReferencePersister)) //JBSER-83
        {
            if (cache.getSubstitution() != null) {
                value = cache.getSubstitution().replaceObject(value);
View Full Code Here

TOP

Related Classes of com.ovea.jetty.session.serializer.jboss.serial.persister.Persister

Copyright © 2018 www.massapicom. 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.