com.sun.corba.se.impl.encoding.CDRInputStream Java Examples

The following examples show how to use com.sun.corba.se.impl.encoding.CDRInputStream. 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: TypeCodeImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #2
Source File: TypeCodeImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #3
Source File: ServiceContexts.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Read the Service contexts from the input stream.
 */
public ServiceContexts(InputStream s)
{
    this( (ORB)(s.orb()) ) ;

    // We need to store this so that we can have access
    // to the CodeBase for unmarshaling possible
    // RMI-IIOP valuetype data within an encapsulation.
    // (Known case: UnknownExceptionInfo)
    codeBase = ((CDRInputStream)s).getCodeBase();

    createMapFromInputStream(s);

    // Fix for bug 4904723
    giopVersion = ((CDRInputStream)s).getGIOPVersion();
}
 
Example #4
Source File: RequestMessage_1_2.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #5
Source File: TypeCodeImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #6
Source File: RequestMessage_1_2.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #7
Source File: ServiceContexts.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Read the Service contexts from the input stream.
 */
public ServiceContexts(InputStream s)
{
    this( (ORB)(s.orb()) ) ;

    // We need to store this so that we can have access
    // to the CodeBase for unmarshaling possible
    // RMI-IIOP valuetype data within an encapsulation.
    // (Known case: UnknownExceptionInfo)
    codeBase = ((CDRInputStream)s).getCodeBase();

    createMapFromInputStream(s);

    // Fix for bug 4904723
    giopVersion = ((CDRInputStream)s).getGIOPVersion();
}
 
Example #8
Source File: TypeCodeImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #9
Source File: TypeCodeImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #10
Source File: ServiceContexts.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Read the Service contexts from the input stream.
 */
public ServiceContexts(InputStream s)
{
    this( (ORB)(s.orb()) ) ;

    // We need to store this so that we can have access
    // to the CodeBase for unmarshaling possible
    // RMI-IIOP valuetype data within an encapsulation.
    // (Known case: UnknownExceptionInfo)
    codeBase = ((CDRInputStream)s).getCodeBase();

    createMapFromInputStream(s);

    // Fix for bug 4904723
    giopVersion = ((CDRInputStream)s).getGIOPVersion();
}
 
Example #11
Source File: RequestMessage_1_2.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #12
Source File: RequestMessage_1_2.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #13
Source File: RequestMessage_1_2.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #14
Source File: ServiceContexts.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Read the Service contexts from the input stream.
 */
public ServiceContexts(InputStream s)
{
    this( (ORB)(s.orb()) ) ;

    // We need to store this so that we can have access
    // to the CodeBase for unmarshaling possible
    // RMI-IIOP valuetype data within an encapsulation.
    // (Known case: UnknownExceptionInfo)
    codeBase = ((CDRInputStream)s).getCodeBase();

    createMapFromInputStream(s);

    // Fix for bug 4904723
    giopVersion = ((CDRInputStream)s).getGIOPVersion();
}
 
Example #15
Source File: TypeCodeImpl.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #16
Source File: TypeCodeImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #17
Source File: RequestMessage_1_2.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #18
Source File: RequestMessage_1_2.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.response_flags = istream.read_octet();
    this.reserved = new byte[3];
    for (int _o0 = 0;_o0 < (3); ++_o0) {
        this.reserved[_o0] = istream.read_octet();
    }
    this.target = TargetAddressHelper.read(istream);
    getObjectKey(); // this does AddressingDisposition check
    this.operation = istream.read_string();
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);

    // CORBA formal 00-11-0 15.4.2.2 GIOP 1.2 body must be
    // aligned on an 8 octet boundary.
    // Ensures that the first read operation called from the stub code,
    // during body deconstruction, would skip the header padding, that was
    // inserted to ensure that the body was aligned on an 8-octet boundary.
    ((CDRInputStream)istream).setHeaderPadding(true);

}
 
Example #19
Source File: TypeCodeImpl.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
public void read_value(InputStream is) {
    if (is instanceof TypeCodeReader) {
        // hardly possible unless caller knows our "private" stream classes.
        if (read_value_kind((TypeCodeReader)is))
            read_value_body(is);
    } else if (is instanceof CDRInputStream) {
        WrapperInputStream wrapper = new WrapperInputStream((CDRInputStream)is);
        //if (debug) System.out.println("Created WrapperInputStream " + wrapper +
        // " with no parent");
        if (read_value_kind((TypeCodeReader)wrapper))
            read_value_body(wrapper);
    } else {
        read_value_kind(is);
        read_value_body(is);
    }
}
 
Example #20
Source File: LocateReplyMessage_1_1.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.reply_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
Example #21
Source File: LocateReplyMessage_1_1.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.reply_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
Example #22
Source File: TypeCodeInputStream.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb) {
    // _REVISIT_ Would be nice if we didn't have to copy the buffer!
    TypeCodeInputStream encap;

    int encapLength = is.read_long();

    // read off part of the buffer corresponding to the encapsulation
    byte[] encapBuffer = new byte[encapLength];
    is.read_octet_array(encapBuffer, 0, encapBuffer.length);

    // create an encapsulation using the marshal buffer
    if (is instanceof CDRInputStream) {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length,
                ((CDRInputStream) is).isLittleEndian(),
                ((CDRInputStream) is).getGIOPVersion());
    } else {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length);
    }
    encap.setEnclosingInputStream(is);
    encap.makeEncapsulation();
    //if (TypeCodeImpl.debug) {
        //System.out.println("Created TypeCodeInputStream " + encap + " with parent " + is);
        //encap.printBuffer();
    //}
    return encap;
}
 
Example #23
Source File: WireObjectKeyTemplate.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
private byte[] getId( InputStream is )
{
    CDRInputStream cis = (CDRInputStream)is ;
    int len = cis.getBufferLength() ;
    byte[] result = new byte[ len ] ;
    cis.read_octet_array( result, 0, len ) ;
    return result ;
}
 
Example #24
Source File: OldJIDLObjectKeyTemplate.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public OldJIDLObjectKeyTemplate( ORB orb, int magic, int scid,
    InputStream is, OctetSeqHolder osh )
{
    this( orb, magic, scid, is );

    osh.value = readObjectKey( is ) ;

    /**
     * Beginning with JDK 1.3.1_01, a byte was placed at the end of
     * the object key with a value indicating the patch version.
     * JDK 1.3.1_01 had the value 1.  If other patches are necessary
     * which involve ORB versioning changes, they should increment
     * the patch version.
     *
     * Note that if we see a value greater than 1 in this code, we
     * will treat it as if we're talking to the most recent ORB version.
     *
     * WARNING: This code is sensitive to changes in CDRInputStream
     * getPosition.  It assumes that the CDRInputStream is an
     * encapsulation whose position can be compared to the object
     * key array length.
     */
    if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW &&
        osh.value.length > ((CDRInputStream)is).getPosition()) {

        patchVersion = is.read_octet();

        if (patchVersion == ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getJDK1_3_1_01());
        else if (patchVersion > ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getORBVersion());
        else
            throw wrapper.invalidJdk131PatchLevel( new Integer( patchVersion ) ) ;
    }
}
 
Example #25
Source File: WireObjectKeyTemplate.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private byte[] getId( InputStream is )
{
    CDRInputStream cis = (CDRInputStream)is ;
    int len = cis.getBufferLength() ;
    byte[] result = new byte[ len ] ;
    cis.read_octet_array( result, 0, len ) ;
    return result ;
}
 
Example #26
Source File: TypeCodeInputStream.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static TypeCodeInputStream readEncapsulation(InputStream is, org.omg.CORBA.ORB _orb) {
    // _REVISIT_ Would be nice if we didn't have to copy the buffer!
    TypeCodeInputStream encap;

    int encapLength = is.read_long();

    // read off part of the buffer corresponding to the encapsulation
    byte[] encapBuffer = new byte[encapLength];
    is.read_octet_array(encapBuffer, 0, encapBuffer.length);

    // create an encapsulation using the marshal buffer
    if (is instanceof CDRInputStream) {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length,
                ((CDRInputStream) is).isLittleEndian(),
                ((CDRInputStream) is).getGIOPVersion());
    } else {
        encap = EncapsInputStreamFactory.newTypeCodeInputStream((ORB) _orb,
                encapBuffer, encapBuffer.length);
    }
    encap.setEnclosingInputStream(is);
    encap.makeEncapsulation();
    //if (TypeCodeImpl.debug) {
        //System.out.println("Created TypeCodeInputStream " + encap + " with parent " + is);
        //encap.printBuffer();
    //}
    return encap;
}
 
Example #27
Source File: LocateReplyMessage_1_1.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.reply_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}
 
Example #28
Source File: OldJIDLObjectKeyTemplate.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public OldJIDLObjectKeyTemplate( ORB orb, int magic, int scid,
    InputStream is, OctetSeqHolder osh )
{
    this( orb, magic, scid, is );

    osh.value = readObjectKey( is ) ;

    /**
     * Beginning with JDK 1.3.1_01, a byte was placed at the end of
     * the object key with a value indicating the patch version.
     * JDK 1.3.1_01 had the value 1.  If other patches are necessary
     * which involve ORB versioning changes, they should increment
     * the patch version.
     *
     * Note that if we see a value greater than 1 in this code, we
     * will treat it as if we're talking to the most recent ORB version.
     *
     * WARNING: This code is sensitive to changes in CDRInputStream
     * getPosition.  It assumes that the CDRInputStream is an
     * encapsulation whose position can be compared to the object
     * key array length.
     */
    if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW &&
        osh.value.length > ((CDRInputStream)is).getPosition()) {

        patchVersion = is.read_octet();

        if (patchVersion == ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getJDK1_3_1_01());
        else if (patchVersion > ObjectKeyFactoryImpl.JDK1_3_1_01_PATCH_LEVEL)
            setORBVersion(ORBVersionFactory.getORBVersion());
        else
            throw wrapper.invalidJdk131PatchLevel( new Integer( patchVersion ) ) ;
    }
}
 
Example #29
Source File: ReplyMessage_1_1.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.service_contexts
        = new ServiceContexts((org.omg.CORBA_2_3.portable.InputStream) istream);
    this.request_id = istream.read_ulong();
    this.reply_status = istream.read_long();
    isValidReplyStatus(this.reply_status); // raises exception on error

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD
    if (this.reply_status == SYSTEM_EXCEPTION) {

        String reposId = istream.read_string();
        this.exClassName = ORBUtility.classNameOf(reposId);
        this.minorCode = istream.read_long();
        int status = istream.read_long();

        switch (status) {
        case CompletionStatus._COMPLETED_YES:
            this.completionStatus = CompletionStatus.COMPLETED_YES;
            break;
        case CompletionStatus._COMPLETED_NO:
            this.completionStatus = CompletionStatus.COMPLETED_NO;
            break;
        case CompletionStatus._COMPLETED_MAYBE:
            this.completionStatus = CompletionStatus.COMPLETED_MAYBE;
            break;
        default:
            throw wrapper.badCompletionStatusInReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if (this.reply_status == USER_EXCEPTION) {
        // do nothing. The client stub will read the exception from body.
    } else if (this.reply_status == LOCATION_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR(cdr) ;
    }
}
 
Example #30
Source File: LocateReplyMessage_1_0.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public void read(org.omg.CORBA.portable.InputStream istream) {
    super.read(istream);
    this.request_id = istream.read_ulong();
    this.locate_status = istream.read_long();
    isValidReplyStatus(this.locate_status); // raises exception on error

    // The code below reads the reply body if status is OBJECT_FORWARD
    if (this.locate_status == OBJECT_FORWARD) {
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }
}