Search in sources :

Example 1 with SystemException

use of org.omg.CORBA.SystemException in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithInetAddress.

public String sayHelloWithInetAddress(InetAddress arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithInetAddress", true);
                out.write_value(arg0, InetAddress.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithInetAddress(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithInetAddress", HelloInterface.class);
        if (so == null) {
            return sayHelloWithInetAddress(arg0);
        }
        try {
            InetAddress arg0Copy = (InetAddress) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithInetAddress(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) InetAddress(java.net.InetAddress)

Example 2 with SystemException

use of org.omg.CORBA.SystemException in project jdk8u_jdk by JetBrains.

the class _HelloImpl_Tie method _invoke.

public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {
    try {
        org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) _in;
        switch(method.length()) {
            case 8:
                if (method.equals("sayHello")) {
                    String arg0 = (String) in.read_value(String.class);
                    String result = target.sayHello(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
            case 14:
                if (method.equals("sayHelloToTest")) {
                    Test arg0 = (Test) in.read_value(Test.class);
                    String result = target.sayHelloToTest(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
            case 19:
                if (method.equals("sayHelloWithHashMap")) {
                    ConcurrentHashMap arg0 = (ConcurrentHashMap) in.read_value(ConcurrentHashMap.class);
                    String result = target.sayHelloWithHashMap(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
            case 20:
                if (method.equals("sayHelloWithHashMap2")) {
                    HashMap arg0 = (HashMap) in.read_value(HashMap.class);
                    String result = target.sayHelloWithHashMap2(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
            case 23:
                if (method.equals("sayHelloWithInetAddress")) {
                    InetAddress arg0 = (InetAddress) in.read_value(InetAddress.class);
                    String result = target.sayHelloWithInetAddress(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
            case 25:
                if (method.equals("sayHelloWithReentrantLock")) {
                    ReentrantLock arg0 = (ReentrantLock) in.read_value(ReentrantLock.class);
                    String result = target.sayHelloWithReentrantLock(arg0);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, String.class);
                    return out;
                }
        }
        throw new BAD_OPERATION();
    } catch (SystemException ex) {
        throw ex;
    } catch (Throwable ex) {
        throw new UnknownException(ex);
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) SystemException(org.omg.CORBA.SystemException) UnknownException(org.omg.CORBA.portable.UnknownException) BAD_OPERATION(org.omg.CORBA.BAD_OPERATION) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) InetAddress(java.net.InetAddress)

Example 3 with SystemException

use of org.omg.CORBA.SystemException in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithHashMap.

public String sayHelloWithHashMap(ConcurrentHashMap arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithHashMap", true);
                out.write_value(arg0, ConcurrentHashMap.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithHashMap(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithHashMap", HelloInterface.class);
        if (so == null) {
            return sayHelloWithHashMap(arg0);
        }
        try {
            ConcurrentHashMap arg0Copy = (ConcurrentHashMap) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithHashMap(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Example 4 with SystemException

use of org.omg.CORBA.SystemException in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloWithReentrantLock.

public String sayHelloWithReentrantLock(ReentrantLock arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloWithReentrantLock", true);
                out.write_value(arg0, ReentrantLock.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloWithReentrantLock(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloWithReentrantLock", HelloInterface.class);
        if (so == null) {
            return sayHelloWithReentrantLock(arg0);
        }
        try {
            ReentrantLock arg0Copy = (ReentrantLock) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloWithReentrantLock(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject)

Example 5 with SystemException

use of org.omg.CORBA.SystemException in project jdk8u_jdk by JetBrains.

the class _HelloInterface_Stub method sayHelloToTest.

public String sayHelloToTest(Test arg0) throws java.rmi.RemoteException {
    if (!Util.isLocal(this)) {
        try {
            org.omg.CORBA_2_3.portable.InputStream in = null;
            try {
                org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("sayHelloToTest", true);
                out.write_value(arg0, Test.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (String) in.read_value(String.class);
            } catch (ApplicationException ex) {
                in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
                String $_id = in.read_string();
                throw new UnexpectedException($_id);
            } catch (RemarshalException ex) {
                return sayHelloToTest(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("sayHelloToTest", HelloInterface.class);
        if (so == null) {
            return sayHelloToTest(arg0);
        }
        try {
            Test arg0Copy = (Test) Util.copyObject(arg0, _orb());
            return ((HelloInterface) so.servant).sayHelloToTest(arg0Copy);
        } catch (Throwable ex) {
            Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
            throw Util.wrapException(exCopy);
        } finally {
            _servant_postinvoke(so);
        }
    }
}
Also used : UnexpectedException(java.rmi.UnexpectedException) InputStream(org.omg.CORBA.portable.InputStream) OutputStream(org.omg.CORBA.portable.OutputStream) RemarshalException(org.omg.CORBA.portable.RemarshalException) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject)

Aggregations

SystemException (org.omg.CORBA.SystemException)15 ApplicationException (org.omg.CORBA.portable.ApplicationException)8 InputStream (org.omg.CORBA.portable.InputStream)8 OutputStream (org.omg.CORBA.portable.OutputStream)8 RemarshalException (org.omg.CORBA.portable.RemarshalException)8 UnexpectedException (java.rmi.UnexpectedException)7 ServantObject (org.omg.CORBA.portable.ServantObject)7 LogLevels (alma.Logging.LoggingConfigurablePackage.LogLevels)3 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)3 AcsJCORBAProblemEx (alma.ACSErrTypeCommon.wrappers.AcsJCORBAProblemEx)2 LogTypeHelper (com.cosylab.logging.engine.log.LogTypeHelper)2 InetAddress (java.net.InetAddress)2 HashMap (java.util.HashMap)2 ReentrantLock (java.util.concurrent.locks.ReentrantLock)2 NoSuchCharacteristic (alma.ACS.NoSuchCharacteristic)1 AcsJIllegalArgumentEx (alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx)1 LoggerDoesNotExistEx (alma.Logging.LoggerDoesNotExistEx)1 LogLvlSelNotSupportedException (alma.acs.gui.loglevel.LogLvlSelNotSupportedException)1 CDBFieldDoesNotExistEx (alma.cdbErrType.CDBFieldDoesNotExistEx)1 WrongCDBDataTypeEx (alma.cdbErrType.WrongCDBDataTypeEx)1