com.sun.corba.se.spi.ior.iiop.IIOPProfile Java Examples
The following examples show how to use
com.sun.corba.se.spi.ior.iiop.IIOPProfile.
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: IIOPProfileImpl.java From JDKSourceCode1.8 with MIT License | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #2
Source File: GIOPVersion.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #3
Source File: GIOPVersion.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #4
Source File: ORBUtility.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * @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: GIOPVersion.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #6
Source File: ORBUtility.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * @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: ORBUtility.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * @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 #8
Source File: IIOPProfileImpl.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #9
Source File: ORBUtility.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * @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 #10
Source File: IIOPProfileImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #11
Source File: GIOPVersion.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #12
Source File: IIOPProfileImpl.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #13
Source File: IIOPProfileImpl.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #14
Source File: GIOPVersion.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #15
Source File: ORBUtility.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * @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: IIOPProfileImpl.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #17
Source File: ORBUtility.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * @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: GIOPVersion.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #19
Source File: ORBUtility.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * @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 #20
Source File: IIOPProfileImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #21
Source File: GIOPVersion.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #22
Source File: GIOPVersion.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #23
Source File: ORBUtility.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * @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 #24
Source File: IIOPProfileImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #25
Source File: IIOPProfileImpl.java From hottub with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #26
Source File: GIOPVersion.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }
Example #27
Source File: ORBUtility.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * @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 #28
Source File: IIOPProfileImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public boolean isEquivalent( TaggedProfile prof ) { if (!(prof instanceof IIOPProfile)) return false ; IIOPProfile other = (IIOPProfile)prof ; return oid.equals( other.getObjectId() ) && proftemp.isEquivalent( other.getTaggedProfileTemplate() ) && oktemp.equals( other.getObjectKeyTemplate() ) ; }
Example #29
Source File: ORBUtility.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * @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 #30
Source File: GIOPVersion.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * This chooses the appropriate GIOP version. * * @return the GIOP version 13.00 if Java serialization is enabled, or * smallest(profGIOPVersion, orbGIOPVersion) */ public static GIOPVersion chooseRequestVersion(ORB orb, IOR ior ) { GIOPVersion orbVersion = orb.getORBData().getGIOPVersion(); IIOPProfile prof = ior.getProfile() ; GIOPVersion profVersion = prof.getGIOPVersion(); // Check if the profile is from a legacy Sun ORB. ORBVersion targetOrbVersion = prof.getORBVersion(); if (!(targetOrbVersion.equals(ORBVersionFactory.getFOREIGN())) && targetOrbVersion.lessThan(ORBVersionFactory.getNEWER())) { // we are dealing with a SUN legacy orb which emits 1.1 IORs, // in spite of being able to handle only GIOP 1.0 messages. return V1_0; } // Now the target has to be (FOREIGN | NEWER*) byte prof_major = profVersion.getMajor(); byte prof_minor = profVersion.getMinor(); byte orb_major = orbVersion.getMajor(); byte orb_minor = orbVersion.getMinor(); if (orb_major < prof_major) { return orbVersion; } else if (orb_major > prof_major) { return profVersion; } else { // both major version are the same if (orb_minor <= prof_minor) { return orbVersion; } else { return profVersion; } } }