Java Code Examples for org.omg.CORBA.CompletionStatus#_COMPLETED_YES

The following examples show how to use org.omg.CORBA.CompletionStatus#_COMPLETED_YES . 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: ReplyMessage_1_0.java    From jdk1.8-source-analysis with Apache License 2.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 2
Source File: ReplyMessage_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.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 3
Source File: ReplyMessage_1_0.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.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 4
Source File: ReplyMessage_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.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 5
Source File: ReplyMessage_1_0.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.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 6
Source File: ReplyMessage_1_1.java    From jdk8u60 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 7
Source File: ReplyMessage_1_0.java    From jdk8u60 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 8
Source File: ReplyMessage_1_1.java    From TencentKona-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 9
Source File: ReplyMessage_1_0.java    From TencentKona-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 10
Source File: ReplyMessage_1_1.java    From jdk1.8-source-analysis with Apache License 2.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 11
Source File: LocateReplyMessage_1_2.java    From jdk8u60 with GNU General Public License v2.0 4 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

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_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.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 12
Source File: ReplyMessage_1_2.java    From TencentKona-8 with GNU General Public License v2.0 4 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
    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);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    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) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 13
Source File: ReplyMessage_1_2.java    From jdk8u60 with GNU General Public License v2.0 4 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
    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);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    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) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 14
Source File: LocateReplyMessage_1_2.java    From JDKSourceCode1.8 with MIT License 4 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

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_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.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 15
Source File: LocateReplyMessage_1_2.java    From TencentKona-8 with GNU General Public License v2.0 4 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

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_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.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 16
Source File: ReplyMessage_1_2.java    From JDKSourceCode1.8 with MIT License 4 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
    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);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    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) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 17
Source File: LocateReplyMessage_1_2.java    From openjdk-jdk8u with GNU General Public License v2.0 4 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

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_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.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 18
Source File: ReplyMessage_1_2.java    From jdk1.8-source-analysis with Apache License 2.0 4 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
    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);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    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) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 19
Source File: ReplyMessage_1_2.java    From openjdk-jdk8u with GNU General Public License v2.0 4 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
    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);

    // The code below reads the reply body in some cases
    // SYSTEM_EXCEPTION & LOCATION_FORWARD & LOCATION_FORWARD_PERM &
    // NEEDS_ADDRESSING_MODE
    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) ||
            (this.reply_status == LOCATION_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the client program.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}
 
Example 20
Source File: LocateReplyMessage_1_2.java    From jdk1.8-source-analysis with Apache License 2.0 4 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

    // GIOP 1.2 LocateReply message bodies are not aligned on
    // 8 byte boundaries.

    // The code below reads the reply body in some cases
    // LOC_SYSTEM_EXCEPTION & OBJECT_FORWARD & OBJECT_FORWARD_PERM &
    // LOC_NEEDS_ADDRESSING_MODE
    if (this.reply_status == LOC_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.badCompletionStatusInLocateReply(
                CompletionStatus.COMPLETED_MAYBE, new Integer(status) );
        }
    } else if ( (this.reply_status == OBJECT_FORWARD) ||
            (this.reply_status == OBJECT_FORWARD_PERM) ){
        CDRInputStream cdr = (CDRInputStream) istream;
        this.ior = IORFactories.makeIOR( cdr ) ;
    }  else if (this.reply_status == LOC_NEEDS_ADDRESSING_MODE) {
        // read GIOP::AddressingDisposition from body and resend the
        // original request using the requested addressing mode. The
        // resending is transparent to the caller.
        this.addrDisposition = AddressingDispositionHelper.read(istream);
    }
}