Package org.omg.CORBA_2_3.portable

Examples of org.omg.CORBA_2_3.portable.OutputStream


    }
   
    public CatalogEJBRemote create() throws CreateException, RemoteException {
        while(true) {
            if (!Util.isLocal(this)) {
                InputStream in = null;
                try {
                    try {
                        OutputStream out = _request("create", true);
                        in = (InputStream)_invoke(out);
                        return (CatalogEJBRemote) in.read_Object(CatalogEJBRemote.class);
                    } catch (ApplicationException ex) {
                        in = (InputStream) ex.getInputStream();
                        String id = in.read_string();
                        if (id.equals("IDL:javax/ejb/CreateEx:1.0")) {
                            throw (CreateException) in.read_value(CreateException.class);
                        }
                        throw new UnexpectedException(id);
                    } catch (RemarshalException ex) {
                        continue;
                    }
View Full Code Here


                    parameterTypes[i] = loadClass(types[i]);
                }
                returnType = loadClass(methodInfo.getReturnType());
            }

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < parameterTypes.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
View Full Code Here

        while (true) {
            // if this is a stub to a remote object we invoke over the wire
            if (!Util.isLocal(stub)) {

                InputStream in = null;
                try {
                    // create the request output stream
                    OutputStream out = (OutputStream) stub._request(operationName, true);

                    // write the arguments
View Full Code Here

                    parameterTypes[i] = loadClass(types[i]);
                }
                returnType = loadClass(methodInfo.getReturnType());
            }

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < parameterTypes.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
View Full Code Here

        while (true) {
            // if this is a stub to a remote object we invoke over the wire
            if (!Util.isLocal(stub)) {

                InputStream in = null;
                try {
                    // create the request output stream
                    OutputStream out = (OutputStream) stub._request(operationName, true);

                    // write the arguments
View Full Code Here

                    parameterTypes[i] = loadClass(types[i]);
                }
                returnType = loadClass(methodInfo.getReturnType());
            }

            InputStream in = null;
            try {
                OutputStream out = (OutputStream)stub._request(operation, true);

                for (int i = 0; i < parameterTypes.length; i++) {
                    // Object arg = (args.length < i) ? null : args[i];
View Full Code Here

    {
        // Note that the exception ID is present in both ae
        // and in the input stream from ae.  The exception
        // reader must actually read the exception ID from
        // the stream.
        InputStream is = (InputStream)ae.getInputStream() ;
        String excName = ae.getId() ;
        int index = findDeclaredException( excName ) ;
        if (index < 0) {
            excName = is.read_string() ;
            Exception res = new UnexpectedException( excName ) ;
            res.initCause( ae ) ;
            return res ;
        }
View Full Code Here

         // To check whether this is a local stub or not we must call
         // org.omg.CORBA.portable.ObjectImpl._is_local(), and _not_
         // javax.rmi.CORBA.Util.isLocal(Stub s), which in Sun's JDK
         // always return false.

         InputStream in = null;
         try {
            try {
               OutputStream out =
                  (OutputStream)_request(operationName, true);
               stubStrategy.writeParams(out, params);
View Full Code Here

                        Any value = nv.value();
                        value.write_value(out);
                }
            }

            InputStream in = null;
            try {
                in = (InputStream) target._invoke(out);

                if (!responseExpected) {
                    return;
                }

                org.omg.CORBA.Any return_value = return_value();
                TypeCode tc = return_value.type();
                if (return_value != null && tc != null) {
                    // create return value
                    return_value.read_value(in, tc);
                }

                for (int i = 0; i < arguments.count(); i++) {
                    NamedValue nv = null;

                    try {
                        nv = arguments.item(i);
                    }
                    catch (org.omg.CORBA.Bounds ex) {
                        throw new org.omg.CORBA.INTERNAL("concurrent modification");
                    }

                    switch (nv.flags()) {
                        case ARG_OUT.value:
                        case ARG_INOUT.value:
                            org.omg.CORBA.Any value = nv.value();
                            value.read_value(in, value.type());
                    }
                }

            }
            catch (org.omg.CORBA.portable.RemarshalException _exception) {
                continue REMARSHAL;

            }
            catch (org.omg.CORBA.portable.UnknownException uex) {

                Throwable e = uex.originalEx;
                String exname = e.getClass().getName();

                for (int i = 0; i < exceptions.count(); i++) {
                    TypeCode ex_tc = null;
                    try {
                        ex_tc = exceptions.item(i);
                    }
                    catch (org.omg.CORBA.Bounds ex) {
                        throw new org.omg.CORBA.INTERNAL("concurrent modification");
                    }

                    String expected;
                    try {
                        expected = RepositoryID.idToClassName(ex_tc.id());
                    }
                    catch (org.omg.CORBA.TypeCodePackage.BadKind ex) {
                        throw new org.omg.CORBA.BAD_PARAM("bad exception type");
                    }

                    if (exname.equals(expected)) {
                        env.exception((Exception) e);
                        return;
                    }
                }

                env.exception(uex);

            }
            catch (org.omg.CORBA.portable.ApplicationException aex) {

                InputStream ex_in = (InputStream) aex.getInputStream();
                String ex_id = aex.getId();

                for (int i = 0; i < exceptions.count(); i++) {
                    TypeCode ex_tc = null;
                    try {
View Full Code Here

    public int tag() {
        return TAG_CODE_SETS.value;
    }

    public static Component read(AbstractORB orb, byte[] data) {
        InputStream eis = new EncapsulationInputStream(orb, data);
        return new CodeSetsComponent(CodeSetComponentInfoHelper.read(eis));
    }
View Full Code Here

TOP

Related Classes of org.omg.CORBA_2_3.portable.OutputStream

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.