Search in sources :

Example 21 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _JRouter_Stub method register.

public void register(JSession arg0, HttpSession arg1, HttpServletRequest arg2, HttpServletResponse arg3) 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("register__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", true);
                out.write_value((Serializable) arg0, JSession.class);
                out.write_value((Serializable) arg1, HttpSession.class);
                out.write_value((Serializable) arg2, HttpServletRequest.class);
                out.write_value((Serializable) arg3, HttpServletResponse.class);
                _invoke(out);
            } 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) {
                register(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("register__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", JRouter.class);
        if (so == null) {
            register(arg0, arg1, arg2, arg3);
            return;
        }
        try {
            Object[] copies = Util.copyObjects(new Object[] { arg0, arg1, arg2, arg3 }, _orb());
            JSession arg0Copy = (JSession) copies[0];
            HttpSession arg1Copy = (HttpSession) copies[1];
            HttpServletRequest arg2Copy = (HttpServletRequest) copies[2];
            HttpServletResponse arg3Copy = (HttpServletResponse) copies[3];
            ((JRouter) so.servant).register(arg0Copy, arg1Copy, arg2Copy, arg3Copy);
        } 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) HttpSession(javax.servlet.http.HttpSession) OutputStream(org.omg.CORBA.portable.OutputStream) HttpServletResponse(javax.servlet.http.HttpServletResponse) RemarshalException(org.omg.CORBA.portable.RemarshalException) JSession(j.app.webserver.JSession) HttpServletRequest(javax.servlet.http.HttpServletRequest) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) ServantObject(org.omg.CORBA.portable.ServantObject) PortableRemoteObject(javax.rmi.PortableRemoteObject)

Example 22 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _JRouter_Stub method getAllServiceNodeAvailable.

public void getAllServiceNodeAvailable(JSession arg0, HttpSession arg1, HttpServletRequest arg2, HttpServletResponse arg3) 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("getAllServiceNodeAvailable__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", true);
                out.write_value((Serializable) arg0, JSession.class);
                out.write_value((Serializable) arg1, HttpSession.class);
                out.write_value((Serializable) arg2, HttpServletRequest.class);
                out.write_value((Serializable) arg3, HttpServletResponse.class);
                _invoke(out);
            } 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) {
                getAllServiceNodeAvailable(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("getAllServiceNodeAvailable__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", JRouter.class);
        if (so == null) {
            getAllServiceNodeAvailable(arg0, arg1, arg2, arg3);
            return;
        }
        try {
            Object[] copies = Util.copyObjects(new Object[] { arg0, arg1, arg2, arg3 }, _orb());
            JSession arg0Copy = (JSession) copies[0];
            HttpSession arg1Copy = (HttpSession) copies[1];
            HttpServletRequest arg2Copy = (HttpServletRequest) copies[2];
            HttpServletResponse arg3Copy = (HttpServletResponse) copies[3];
            ((JRouter) so.servant).getAllServiceNodeAvailable(arg0Copy, arg1Copy, arg2Copy, arg3Copy);
        } 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) HttpSession(javax.servlet.http.HttpSession) OutputStream(org.omg.CORBA.portable.OutputStream) HttpServletResponse(javax.servlet.http.HttpServletResponse) RemarshalException(org.omg.CORBA.portable.RemarshalException) JSession(j.app.webserver.JSession) HttpServletRequest(javax.servlet.http.HttpServletRequest) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) ServantObject(org.omg.CORBA.portable.ServantObject) PortableRemoteObject(javax.rmi.PortableRemoteObject)

Example 23 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _JRouter_Stub method setRouterConfig.

public void setRouterConfig(RouterConfig 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("_set_routerConfig", true);
                out.write_value(arg0, RouterConfig.class);
                _invoke(out);
            } 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) {
                setRouterConfig(arg0);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("_set_routerConfig", JRouter.class);
        if (so == null) {
            setRouterConfig(arg0);
            return;
        }
        try {
            RouterConfig arg0Copy = (RouterConfig) Util.copyObject(arg0, _orb());
            ((JRouter) so.servant).setRouterConfig(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)

Example 24 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _JRouter_Stub method getAllServiceNodeAvailable.

public ServiceBase[] getAllServiceNodeAvailable(String arg0, String arg1, String arg2) 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("getAllServiceNodeAvailable__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue", true);
                out.write_value(arg0, String.class);
                out.write_value(arg1, String.class);
                out.write_value(arg2, String.class);
                in = (org.omg.CORBA_2_3.portable.InputStream) _invoke(out);
                return (ServiceBase[]) in.read_value(ServiceBase[].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 getAllServiceNodeAvailable(arg0, arg1, arg2);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("getAllServiceNodeAvailable__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue", JRouter.class);
        if (so == null) {
            return getAllServiceNodeAvailable(arg0, arg1, arg2);
        }
        try {
            ServiceBase[] result = ((JRouter) so.servant).getAllServiceNodeAvailable(arg0, arg1, arg2);
            return (ServiceBase[]) Util.copyObject(result, _orb());
        } 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) ServiceBase(j.service.server.ServiceBase) ServantObject(org.omg.CORBA.portable.ServantObject)

Example 25 with ServantObject

use of org.omg.CORBA.portable.ServantObject in project JFramework by gugumall.

the class _JRouter_Stub method unregister.

public void unregister(JSession arg0, HttpSession arg1, HttpServletRequest arg2, HttpServletResponse arg3) 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("unregister__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", true);
                out.write_value((Serializable) arg0, JSession.class);
                out.write_value((Serializable) arg1, HttpSession.class);
                out.write_value((Serializable) arg2, HttpServletRequest.class);
                out.write_value((Serializable) arg3, HttpServletResponse.class);
                _invoke(out);
            } 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) {
                unregister(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("unregister__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", JRouter.class);
        if (so == null) {
            unregister(arg0, arg1, arg2, arg3);
            return;
        }
        try {
            Object[] copies = Util.copyObjects(new Object[] { arg0, arg1, arg2, arg3 }, _orb());
            JSession arg0Copy = (JSession) copies[0];
            HttpSession arg1Copy = (HttpSession) copies[1];
            HttpServletRequest arg2Copy = (HttpServletRequest) copies[2];
            HttpServletResponse arg3Copy = (HttpServletResponse) copies[3];
            ((JRouter) so.servant).unregister(arg0Copy, arg1Copy, arg2Copy, arg3Copy);
        } 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) HttpSession(javax.servlet.http.HttpSession) OutputStream(org.omg.CORBA.portable.OutputStream) HttpServletResponse(javax.servlet.http.HttpServletResponse) RemarshalException(org.omg.CORBA.portable.RemarshalException) JSession(j.app.webserver.JSession) HttpServletRequest(javax.servlet.http.HttpServletRequest) ApplicationException(org.omg.CORBA.portable.ApplicationException) SystemException(org.omg.CORBA.SystemException) ServantObject(org.omg.CORBA.portable.ServantObject) ServantObject(org.omg.CORBA.portable.ServantObject) PortableRemoteObject(javax.rmi.PortableRemoteObject)

Aggregations

UnexpectedException (java.rmi.UnexpectedException)28 SystemException (org.omg.CORBA.SystemException)28 ApplicationException (org.omg.CORBA.portable.ApplicationException)28 InputStream (org.omg.CORBA.portable.InputStream)28 OutputStream (org.omg.CORBA.portable.OutputStream)28 RemarshalException (org.omg.CORBA.portable.RemarshalException)28 ServantObject (org.omg.CORBA.portable.ServantObject)28 JSession (j.app.webserver.JSession)7 HttpServletRequest (javax.servlet.http.HttpServletRequest)7 HttpServletResponse (javax.servlet.http.HttpServletResponse)7 HttpSession (javax.servlet.http.HttpSession)7 PortableRemoteObject (javax.rmi.PortableRemoteObject)5 ServiceBase (j.service.server.ServiceBase)2 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)2 InetAddress (java.net.InetAddress)1 HashMap (java.util.HashMap)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1