public boolean lessThan(ORBVersion version) { return orbType < version.getORBType(); }
public void write(ObjectId objectId, OutputStream os) { super.write(objectId, os); getORBVersion().write(os); }
public void readData(InputStreamHook stream) throws IOException { org.omg.CORBA.ORB orb = stream.getOrbStream().orb(); if ((orb == null) || !(orb instanceof org.jboss.com.sun.corba.se.spi.orb.ORB)) { throw new StreamCorruptedException("Default data must be read first"); } ORBVersion clientOrbVersion = ((org.jboss.com.sun.corba.se.spi.orb.ORB) orb).getORBVersion(); // Fix Date interop bug. For older versions of the ORB don't do // anything for readData(). Before this used to throw // StreamCorruptedException for older versions of the ORB where // calledDefaultWriteObject always returns true. if ((ORBVersionFactory.getPEORB().compareTo(clientOrbVersion) <= 0) || (clientOrbVersion.equals(ORBVersionFactory.getFOREIGN()))) { // XXX I18N and logging needed. throw new StreamCorruptedException("Default data must be read first"); } } }
&& targetOrbVersion.lessThan(ORBVersionFactory.getNEWER()))
public void readData(InputStreamHook stream) throws IOException { org.omg.CORBA.ORB orb = stream.getOrbStream().orb(); if ((orb == null) || !(orb instanceof org.jboss.com.sun.corba.se.spi.orb.ORB)) { throw new StreamCorruptedException("Default data must be read first"); } ORBVersion clientOrbVersion = ((org.jboss.com.sun.corba.se.spi.orb.ORB) orb).getORBVersion(); // Fix Date interop bug. For older versions of the ORB don't do // anything for readData(). Before this used to throw // StreamCorruptedException for older versions of the ORB where // calledDefaultWriteObject always returns true. if ((ORBVersionFactory.getPEORB().compareTo(clientOrbVersion) <= 0) || (clientOrbVersion.equals(ORBVersionFactory.getFOREIGN()))) { // XXX I18N and logging needed. throw new StreamCorruptedException("Default data must be read first"); } } }
&& targetOrbVersion.lessThan(ORBVersionFactory.getNEWER()))
/** * Handles ORB versioning of the end tag. Should only be called if chunking. * * If talking to our older ORBs (Standard Extension, Kestrel, and Ladybird), write the end flag that takes into * account all enclosing valuetypes. * * If talking a newer or foreign ORB, or if the orb instance is null, write the end flag that only takes into * account the enclosing chunked valuetypes. */ private void writeNestingLevel() { if (orb == null || ORBVersionFactory.getFOREIGN().equals(orb.getORBVersion()) || ORBVersionFactory.getNEWER().compareTo(orb.getORBVersion()) <= 0) { write_long(chunkedValueNestingLevel); } else { write_long(end_flag); } }
public boolean equals(Object obj) { if (!(obj instanceof ORBVersion)) return false; ORBVersion version = (ORBVersion) obj; return version.getORBType() == orbType; }
public void write(ObjectId objectId, OutputStream os) { super.write(objectId, os); getORBVersion().write(os); }
/** * Handles ORB versioning of the end tag. Should only be called if chunking. * * If talking to our older ORBs (Standard Extension, Kestrel, and Ladybird), write the end flag that takes into * account all enclosing valuetypes. * * If talking a newer or foreign ORB, or if the orb instance is null, write the end flag that only takes into * account the enclosing chunked valuetypes. */ private void writeNestingLevel() { if (orb == null || ORBVersionFactory.getFOREIGN().equals(orb.getORBVersion()) || ORBVersionFactory.getNEWER().compareTo(orb.getORBVersion()) <= 0) { write_long(chunkedValueNestingLevel); } else { write_long(end_flag); } }
public boolean equals(Object obj) { if (!(obj instanceof ORBVersion)) return false; ORBVersion version = (ORBVersion) obj; return version.getORBType() == orbType; }
public void write(OutputStream os) { super.write(os); getORBVersion().write(os); }
/** * This is used to create the TypeCode for a null reference. It also handles backwards compatibility with JDK 1.3.x. * * This method will not return null. */ private TypeCode createTypeCodeForNull(org.omg.CORBA.ORB orb) { if (orb instanceof ORB) { ORB ourORB = (ORB) orb; // Preserve backwards compatibility with Kestrel and Ladybird by not fully implementing interop issue // resolution 3857, and returning a null TypeCode with a tk_value TCKind. If we're not talking to Kestrel or // Ladybird, fall through to the abstract interface case (also used for foreign ORBs). if (!ORBVersionFactory.getFOREIGN().equals(ourORB.getORBVersion()) && ORBVersionFactory.getNEWER().compareTo(ourORB.getORBVersion()) > 0) { return orb.get_primitive_tc(TCKind.tk_value); } } // Use tk_abstract_interface as detailed in the resolution // REVISIT: Define this in IDL and get the ID in generated code String abstractBaseID = "IDL:omg.org/CORBA/AbstractBase:1.0"; return orb.create_abstract_interface_tc(abstractBaseID, ""); }
public boolean lessThan(ORBVersion version) { return orbType < version.getORBType(); }
public void write(OutputStream os) { super.write(os); getORBVersion().write(os); }
/** * This is used to create the TypeCode for a null reference. It also handles backwards compatibility with JDK 1.3.x. * * This method will not return null. */ private TypeCode createTypeCodeForNull(org.omg.CORBA.ORB orb) { if (orb instanceof ORB) { ORB ourORB = (ORB) orb; // Preserve backwards compatibility with Kestrel and Ladybird by not fully implementing interop issue // resolution 3857, and returning a null TypeCode with a tk_value TCKind. If we're not talking to Kestrel or // Ladybird, fall through to the abstract interface case (also used for foreign ORBs). if (!ORBVersionFactory.getFOREIGN().equals(ourORB.getORBVersion()) && ORBVersionFactory.getNEWER().compareTo(ourORB.getORBVersion()) > 0) { return orb.get_primitive_tc(TCKind.tk_value); } } // Use tk_abstract_interface as detailed in the resolution // REVISIT: Define this in IDL and get the ID in generated code String abstractBaseID = "IDL:omg.org/CORBA/AbstractBase:1.0"; return orb.create_abstract_interface_tc(abstractBaseID, ""); }
public int compareTo(ORBVersion obj) { // The Comparable interface says that this // method throws a ClassCastException if the // given object's type prevents it from being // compared. return getORBType() - obj.getORBType(); } }
|| ORBVersionFactory.getNEWER().compareTo(orb.getORBVersion()) <= 0)
public int compareTo(ORBVersion obj) { // The Comparable interface says that this // method throws a ClassCastException if the // given object's type prevents it from being // compared. return getORBType() - obj.getORBType(); } }
|| ORBVersionFactory.getNEWER().compareTo(orb.getORBVersion()) <= 0)