public static BufferManagerRead newBufferManagerRead(GIOPVersion version, byte encodingVersion, ORB orb) { // REVISIT - On the reading side, shouldn't we monitor the incoming // fragments on a given connection to determine what fragment size // they're using, then use that ourselves? if (encodingVersion != Message.CDR_ENC_VERSION) { return new BufferManagerReadGrow(orb); } switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new BufferManagerReadGrow(orb); case GIOPVersion.VERSION_1_1 : case GIOPVersion.VERSION_1_2 : // The stream reader can handle fragmented and // non fragmented messages return new BufferManagerReadStream(orb); default : // REVISIT - what is appropriate? throw new INTERNAL("Unknown GIOP version: " + version); } }
public static BufferManagerRead newBufferManagerRead(GIOPVersion version, byte encodingVersion, ORB orb) { // REVISIT - On the reading side, shouldn't we monitor the incoming // fragments on a given connection to determine what fragment size // they're using, then use that ourselves? if (encodingVersion != Message.CDR_ENC_VERSION) { return new BufferManagerReadGrow(orb); } switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new BufferManagerReadGrow(orb); case GIOPVersion.VERSION_1_1 : case GIOPVersion.VERSION_1_2 : // The stream reader can handle fragmented and // non fragmented messages return new BufferManagerReadStream(orb); default : // REVISIT - what is appropriate? throw new INTERNAL("Unknown GIOP version: " + version); } }
public static CDROutputStreamBase newOutputStream(ORB orb, GIOPVersion version, byte encodingVersion) { switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new CDROutputStream_1_0(); case GIOPVersion.VERSION_1_1 : return new CDROutputStream_1_1(); case GIOPVersion.VERSION_1_2 : if (encodingVersion != Message.CDR_ENC_VERSION) { return new IDLJavaSerializationOutputStream(encodingVersion); } return new CDROutputStream_1_2(); default : ORBUtilSystemException wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); // REVISIT - what is appropriate? INTERNAL exceptions // are really hard to track later. throw wrapper.unsupportedGiopVersion(version); } } }
public static CDROutputStreamBase newOutputStream(ORB orb, GIOPVersion version, byte encodingVersion) { switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new CDROutputStream_1_0(); case GIOPVersion.VERSION_1_1 : return new CDROutputStream_1_1(); case GIOPVersion.VERSION_1_2 : if (encodingVersion != Message.CDR_ENC_VERSION) { return new IDLJavaSerializationOutputStream(encodingVersion); } return new CDROutputStream_1_2(); default : ORBUtilSystemException wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); // REVISIT - what is appropriate? INTERNAL exceptions // are really hard to track later. throw wrapper.unsupportedGiopVersion(version); } } }
public static CDRInputStreamBase newInputStream(ORB orb, GIOPVersion version, byte encodingVersion) { switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new CDRInputStream_1_0(); case GIOPVersion.VERSION_1_1 : return new CDRInputStream_1_1(); case GIOPVersion.VERSION_1_2 : if (encodingVersion != Message.CDR_ENC_VERSION) { return new IDLJavaSerializationInputStream(encodingVersion); } return new CDRInputStream_1_2(); // else fall through and report exception. default : ORBUtilSystemException wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); throw wrapper.unsupportedGiopVersion(version); } } }
public static CDRInputStreamBase newInputStream(ORB orb, GIOPVersion version, byte encodingVersion) { switch (version.intValue()) { case GIOPVersion.VERSION_1_0 : return new CDRInputStream_1_0(); case GIOPVersion.VERSION_1_1 : return new CDRInputStream_1_1(); case GIOPVersion.VERSION_1_2 : if (encodingVersion != Message.CDR_ENC_VERSION) { return new IDLJavaSerializationInputStream(encodingVersion); } return new CDRInputStream_1_2(); // else fall through and report exception. default : ORBUtilSystemException wrapper = ORBUtilSystemException.get(orb, CORBALogDomains.RPC_ENCODING); throw wrapper.unsupportedGiopVersion(version); } } }