com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent Java Examples

The following examples show how to use com.sun.corba.se.impl.ior.iiop.JavaSerializationComponent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: IIOPFactories.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #2
Source File: ORBUtility.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #3
Source File: IIOPFactories.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #4
Source File: ORBUtility.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #5
Source File: IIOPFactories.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #6
Source File: ORBUtility.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #7
Source File: IIOPFactories.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #8
Source File: ORBUtility.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #9
Source File: IIOPFactories.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #10
Source File: ORBUtility.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #11
Source File: IIOPFactories.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #12
Source File: ORBUtility.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #13
Source File: IIOPFactories.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #14
Source File: ORBUtility.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #15
Source File: ORBUtility.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #16
Source File: IIOPFactories.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #17
Source File: ORBUtility.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #18
Source File: IIOPFactories.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #19
Source File: IIOPFactories.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static IdentifiableFactory makeJavaSerializationComponentFactory() {
    return new EncapsulationFactoryBase(
                            ORBConstants.TAG_JAVA_SERIALIZATION_ID) {
        public Identifiable readContents(InputStream in) {
            byte version = in.read_octet();
            Identifiable cmp = new JavaSerializationComponent(version);
            return cmp;
        }
    };
}
 
Example #20
Source File: ORBUtility.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @return the Java serialization encoding version.
 */
public static byte getEncodingVersion(ORB orb, IOR ior) {

    // Is Java serialization enabled?
    // Check the JavaSerializationComponent (tagged component)
    // in the IIOPProfile. If present, the peer ORB's GIOP is capable
    // of using Java serialization instead of CDR serialization.
    // In such a case, use Java serialization, iff the java serialization
    // versions match.

    if (orb.getORBData().isJavaSerializationEnabled()) {
        IIOPProfile prof = ior.getProfile();
        IIOPProfileTemplate profTemp =
            (IIOPProfileTemplate) prof.getTaggedProfileTemplate();
        java.util.Iterator iter = profTemp.iteratorById(
                              ORBConstants.TAG_JAVA_SERIALIZATION_ID);
        if (iter.hasNext()) {
            JavaSerializationComponent jc =
                (JavaSerializationComponent) iter.next();
            byte jcVersion = jc.javaSerializationVersion();
            if (jcVersion >= Message.JAVA_ENC_VERSION) {
                return Message.JAVA_ENC_VERSION;
            } else if (jcVersion > Message.CDR_ENC_VERSION) {
                return jc.javaSerializationVersion();
            } else {
                // throw error?
                // Since encodingVersion is <= 0 (CDR_ENC_VERSION).
            }
        }
    }
    return Message.CDR_ENC_VERSION; // default
}
 
Example #21
Source File: IIOPFactories.java    From jdk1.8-source-analysis with Apache License 2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #22
Source File: IIOPFactories.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #23
Source File: IIOPFactories.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #24
Source File: IIOPFactories.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #25
Source File: IIOPFactories.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #26
Source File: IIOPFactories.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #27
Source File: IIOPFactories.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #28
Source File: IIOPFactories.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #29
Source File: IIOPFactories.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}
 
Example #30
Source File: IIOPFactories.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static JavaSerializationComponent makeJavaSerializationComponent() {
    return JavaSerializationComponent.singleton();
}