Package org.apache.axis2.context.externalize

Examples of org.apache.axis2.context.externalize.SafeObjectInputStream


        FileInputStream inStream = new FileInputStream(theFile);

        // attach a stream capable of reading objects from the
        // stream connected to the file
        ObjectInputStream inObjStream = new ObjectInputStream(inStream);
                                SafeObjectInputStream in =
                                    SafeObjectInputStream.install(inObjStream);

        // try to restore the options
                log.debug("ObjectSaveTest:testObjectSerializable(): restoring .....");
        restored = false;
                                Object restored_obj = in.readObject();
        inObjStream.close();
        inStream.close();

        restored = true;
                log.debug(
View Full Code Here


        FileInputStream inStream = new FileInputStream(theFile);

        // attach a stream capable of reading objects from the
        // stream connected to the file
        ObjectInputStream inObjStream = new ObjectInputStream(inStream);
                                SafeObjectInputStream in =
                                    SafeObjectInputStream.install(inObjStream);

        // try to restore the options
                log.debug("ObjectSaveTest:testArrayList(): restoring .....");
        restored = false;
                                restored_obj = in.readArrayList();
        inObjStream.close();
        inStream.close();

        restored = true;
                log.debug("ObjectSaveTest:testArrayList(): ....restored operation completed.....");
View Full Code Here

        FileInputStream inStream = new FileInputStream(theFile);

        // attach a stream capable of reading objects from the
        // stream connected to the file
        ObjectInputStream inObjStream = new ObjectInputStream(inStream);
                                SafeObjectInputStream in =
                                    SafeObjectInputStream.install(inObjStream);

        // try to restore the options
                log.debug("ObjectSaveTest:testHashMap(): restoring .....");
        restored = false;
                                restored_obj = in.readHashMap();
        inObjStream.close();
        inStream.close();

        restored = true;
                log.debug("ObjectSaveTest:testHashMap(): ....restored operation completed.....");
View Full Code Here

        FileInputStream inStream = new FileInputStream(theFile);

        // attach a stream capable of reading objects from the
        // stream connected to the file
        ObjectInputStream inObjStream = new ObjectInputStream(inStream);
                                SafeObjectInputStream in =
                                    SafeObjectInputStream.install(inObjStream);

        // try to restore the options
                log.debug("ObjectSaveTest:testLinkedList(): restoring .....");
        restored = false;
                                restored_obj = in.readLinkedList();
        inObjStream.close();
        inStream.close();

        restored = true;
                log.debug("ObjectSaveTest:testLinkedList(): ....restored operation completed.....");
View Full Code Here

     * @param in The stream to read the object contents from
     * @throws IOException
     * @throws ClassNotFoundException
     */
    public void readExternal(ObjectInput inObject) throws IOException, ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(inObject);
        // trace point
        if (log.isTraceEnabled()) {
            log.trace(myClassName + ":readExternal():  BEGIN  bytes available in stream [" +
                    in.available() + "]  ");
        }

        // serialization version ID
        long suid = in.readLong();

        // revision ID
        int revID = in.readInt();

        // make sure the object data is in a version we can handle
        if (suid != serialVersionUID) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_SUID);
        }

        // make sure the object data is in a revision level we can handle
        if (revID != REVISION_2) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_REVID);
        }

        //---------------------------------------------------------
        // various simple fields
        //---------------------------------------------------------
        long time = in.readLong();
        setLastTouchedTime(time);

        sessionContextTimeoutInterval = in.readLong();
        cookieID = (String) in.readObject();

        //---------------------------------------------------------
        // properties
        //---------------------------------------------------------
        properties = in.readMap(new HashMap());

        //---------------------------------------------------------
        // "nested"
        //---------------------------------------------------------

        // parent
        parent = (AbstractContext) in.readObject();

        //---------------------------------------------------------
        // done
        //---------------------------------------------------------

View Full Code Here

     * @param in The stream to read the object contents from
     * @throws IOException
     * @throws ClassNotFoundException
     */
    public void readExternal(ObjectInput inObject) throws IOException, ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(inObject);
        // set the flag to indicate that the message context is being
        // reconstituted and will need to have certain object references
        // to be reconciled with the current engine setup
        needsToBeReconciled = true;

        // trace point
        if (log.isTraceEnabled()) {
            log.trace(myClassName + ":readExternal():  BEGIN  bytes available in stream [" +
                      in.available() + "]  ");
        }

        // serialization version ID
        long suid = in.readLong();

        // revision ID
        int revID = in.readInt();

        // make sure the object data is in a version we can handle
        if (suid != serialVersionUID) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_SUID);
        }

        // make sure the object data is in a revision level we can handle
        if (revID != REVISION_2) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_REVID);
        }

        //---------------------------------------------------------
        // various simple fields
        //---------------------------------------------------------

        long time = in.readLong();
        setLastTouchedTime(time);
        id = (String) in.readObject();

        //---------------------------------------------------------
        // properties
        //---------------------------------------------------------
        properties = in.readMap(new HashMap());

        //---------------------------------------------------------
        // AxisServiceGroup
        //---------------------------------------------------------

        // axisServiceGroup is not usable until the meta data has been reconciled
        axisServiceGroup = null;
        metaAxisServiceGroup = (MetaDataEntry) in.readObject();

        //---------------------------------------------------------
        // parent
        //---------------------------------------------------------

View Full Code Here

     * @param in The stream to read the object contents from
     * @throws IOException
     * @throws ClassNotFoundException
     */
    public void readExternal(ObjectInput inObject) throws IOException, ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(inObject);
        // set the flag to indicate that the message context is being
        // reconstituted and will need to have certain object references
        // to be reconciled with the current engine setup
        needsToBeReconciled = true;

        // trace point
        log.trace(myClassName + ":readExternal():  BEGIN  bytes available in stream [" +
                in.available() + "]  ");

        //---------------------------------------------------------
        // object level identifiers
        //---------------------------------------------------------

        // serialization version ID
        long suid = in.readLong();

        // revision ID
        int revID = in.readInt();

        // make sure the object data is in a version we can handle
        if (suid != serialVersionUID) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_SUID);
        }

        // make sure the object data is in a revision level we can handle
        if (revID != REVISION_2) {
            throw new ClassNotFoundException(ExternalizeConstants.UNSUPPORTED_REVID);
        }

        //---------------------------------------------------------
        // various simple fields
        //---------------------------------------------------------

        long time = in.readLong();
        setLastTouchedTime(time);

        isComplete = in.readBoolean();
        key = (String) in.readObject();
        logCorrelationIDString = (String) in.readObject();
      
        // trace point
        if (log.isTraceEnabled()) {
            log.trace(myClassName + ":readExternal():  reading input stream for [" +
                      getLogCorrelationIDString() + "]  ");
        }

        //---------------------------------------------------------
        // properties
        //---------------------------------------------------------
        in.readUTF(); // read marker
        properties = in.readMap(new HashMap());

        //---------------------------------------------------------
        // axis operation meta data
        //---------------------------------------------------------

        // axisOperation is not usable until the meta data has been reconciled
        axisOperation = null;
        in.readUTF(); // read marker
        metaAxisOperation = (MetaDataEntry) in.readObject();

        //---------------------------------------------------------
        // axis service meta data
        //---------------------------------------------------------
        // axisService is not usable until the meta data has been reconciled
        in.readUTF(); // read marker
        metaAxisService = (MetaDataEntry) in.readObject();

        //---------------------------------------------------------
        // parent
        //---------------------------------------------------------
        // ServiceContext is not usable until it has been activated
        in.readUTF(); // read marker
        metaParent = (ServiceContext) in.readObject();

        //---------------------------------------------------------
        // HashMap messageContexts table
        //---------------------------------------------------------

        // set to empty until this can be activiated
        messageContexts = new HashMap();
        in.readUTF(); // read marker
        workingSet = in.readHashMap();
        in.readUTF(); // read marker
        metaMessageContextMap = in.readHashMap();
       
        //---------------------------------------------------------
        // done
        //---------------------------------------------------------
    }
View Full Code Here

     * @param in The stream to read the object contents from
     * @throws IOException
     * @throws ClassNotFoundException
     */
    public void readExternal(ObjectInput inObject) throws IOException, ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(inObject);

        // serialization version ID
        long suid = in.readLong();

        // revision ID
        int revID = in.readInt();

        // make sure the object data is in a version we can handle
        if (suid != serialVersionUID) {
            throw new ClassNotFoundException(UNSUPPORTED_SUID);
        }

        // make sure the object data is in a revision level we can handle
        if (revID != REVISION_2) {
            throw new ClassNotFoundException(UNSUPPORTED_REVID);
        }

        //---------------------------------------------------------
        // various simple fields
        //---------------------------------------------------------

        className = (String) in.readObject();
        qnameAsString = (String) in.readObject();
        extraName = (String) in.readObject();
        children = in.readArrayList();

    }
View Full Code Here

     * @throws IOException
     * @throws ClassNotFoundException
     */
    public static String readString(ObjectInput i, String desc) throws IOException,
                                                               ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(i);

        // Get the marker
        in.readUTF();

        // Get the object
        return (String) in.readObject();
    }
View Full Code Here

     * @throws IOException
     * @throws ClassNotFoundException
     */
    public static Object readObject(ObjectInput i, String desc) throws IOException,
                                                               ClassNotFoundException {
        SafeObjectInputStream in = SafeObjectInputStream.install(i);
        in.readUTF(); // Read Marker
        return in.readObject();
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.context.externalize.SafeObjectInputStream

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.