Search in sources :

Example 1 with InputStream

use of org.omg.CORBA.portable.InputStream 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)

Aggregations

InetAddress (java.net.InetAddress)1 HashMap (java.util.HashMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1 BAD_OPERATION (org.omg.CORBA.BAD_OPERATION)1 SystemException (org.omg.CORBA.SystemException)1 InputStream (org.omg.CORBA.portable.InputStream)1 OutputStream (org.omg.CORBA.portable.OutputStream)1 UnknownException (org.omg.CORBA.portable.UnknownException)1