Package org.jacorb.orb.giop

Examples of org.jacorb.orb.giop.ReplyInputStream


            // forward request rebound the Delegate
            group.waitOnBarrier();
            throw new RemarshalException();
        }

        final ReplyInputStream reply = ( ReplyInputStream ) in;

        final ReplyStatusType_1_2 status = reply.getStatus();

        switch ( status.value() )
        {
            case ReplyStatusType_1_2._NO_EXCEPTION:
            {
                try
                {
                    interceptors.handle_receive_reply ( reply );
                }
                catch (ForwardRequest fwd)
                {
                    // should not happen with a remote request
                }

                checkTimeout();
                return reply;
            }
            case ReplyStatusType_1_2._USER_EXCEPTION:
            {
                ApplicationException ae = getApplicationException ( reply );
                try
                {
                    interceptors.handle_receive_exception( ae, reply );
                }
                catch (ForwardRequest fwd)
                {
                    // should not happen with a remote request
                }

                checkTimeout();
                throw ae;
            }
            case ReplyStatusType_1_2._SYSTEM_EXCEPTION:
            {
                SystemException se = SystemExceptionHelper.read ( reply );
                try
                {
                    interceptors.handle_receive_exception( se, reply );
                }
                catch (ForwardRequest fwd)
                {
                    // should not happen with a remote request
                }

                checkTimeout();
                throw se;
            }
            case ReplyStatusType_1_2._LOCATION_FORWARD:
            case ReplyStatusType_1_2._LOCATION_FORWARD_PERM:
            {
                org.omg.CORBA.Object forward_reference = reply.read_Object();
                try
                {
                    interceptors.handle_location_forward( reply, forward_reference );
                }
                catch (ForwardRequest fwd)
View Full Code Here


                    connectionToUse.sendRequest (ros, rcv, ros.requestId(), true);
                    // connections[TransportType.IIOP.ordinal ()].sendRequest (ros, rcv, ros.requestId(), true);
                }
                getParsedIOR ().markLastUsedProfile ();

                ReplyInputStream in = rcv.getReply();
                try
                {
                    interceptors.handle_receive_reply (in);
                }
                catch (ForwardRequest fwd)
View Full Code Here

    {
        ReplyOutputStream out = new ReplyOutputStream(orb, 1, ReplyStatusType_1_2.NO_EXCEPTION, 0, false, TestUtils.getLogger());

        out.write_wchar('a');

        ReplyInputStream in = new ReplyInputStream(orb, out.getBufferCopy());

        assertEquals(0, in.getGIOPMinor());

        try
        {
            in.read_wchar();
            fail();
        }
        catch(MARSHAL e)
        {
            assertEquals(6, e.minor);
        }
        finally
        {
            out.close();
            in.close();
        }
    }
View Full Code Here

    {
        ReplyOutputStream out = new ReplyOutputStream(orb, 1, ReplyStatusType_1_2.NO_EXCEPTION, 0, false, TestUtils.getLogger());

        out.write_wstring("string");

        ReplyInputStream in = new ReplyInputStream(orb, out.getBufferCopy());

        assertEquals(0, in.getGIOPMinor());

        try
        {
            in.read_wstring();
            fail();
        }
        catch(MARSHAL e)
        {
            assertEquals(6, e.minor);
        }
        finally
        {
            out.close();
            in.close();
        }
    }
View Full Code Here

        String message = null;

        if (in instanceof ReplyInputStream)
        {
            final ReplyInputStream input = (ReplyInputStream)in;

            try
            {
                final ServiceContext context = input.getServiceContext(ExceptionDetailMessage.value);
                if (context != null)
                {
                    final CDRInputStream data = new CDRInputStream(context.context_data);

                    try
                    {
                        data.openEncapsulatedArray();
                        message = data.read_wstring();
                    }
                    finally
                    {
                        data.close();
                    }
                }
            }
            finally
            {
                input.close();
            }
        }

        try
        {
View Full Code Here

TOP

Related Classes of org.jacorb.orb.giop.ReplyInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.