Search in sources :

Example 1 with JSession

use of j.app.webserver.JSession in project JFramework by gugumall.

the class _ServiceBase_Stub method auth.

public void auth(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("auth__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) {
                auth(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("auth__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", ServiceBase.class);
        if (so == null) {
            auth(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];
            ((ServiceBase) so.servant).auth(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)

Example 2 with JSession

use of j.app.webserver.JSession in project JFramework by gugumall.

the class _ServiceBase_Stub method heartbeat.

public void heartbeat(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("heartbeat__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) {
                heartbeat(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("heartbeat__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", ServiceBase.class);
        if (so == null) {
            heartbeat(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];
            ((ServiceBase) so.servant).heartbeat(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)

Example 3 with JSession

use of j.app.webserver.JSession in project JFramework by gugumall.

the class _JRouterAbstract_Tie method _invoke.

public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {
    try {
        JRouterAbstract target = this.target;
        if (target == null) {
            throw new java.io.IOException();
        }
        org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream) _in;
        switch(method.length()) {
            case 7:
                if (method.equals("startup")) {
                    target.startup();
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 8:
                if (method.equals("shutdown")) {
                    target.shutdown();
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 11:
                if (method.equals("heartbeat__")) {
                    String result = target.heartbeat();
                    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 17:
                if (method.equals("_get_routerConfig")) {
                    RouterConfig result = target.getRouterConfig();
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(result, RouterConfig.class);
                    return out;
                } else if (method.equals("_set_routerConfig")) {
                    RouterConfig arg0 = (RouterConfig) in.read_value(RouterConfig.class);
                    target.setRouterConfig(arg0);
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 67:
                if (method.equals("service__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue")) {
                    String arg0 = (String) in.read_value(String.class);
                    String arg1 = (String) in.read_value(String.class);
                    String arg2 = (String) in.read_value(String.class);
                    ServiceBase result = target.service(arg0, arg1, arg2);
                    OutputStream out = reply.createReply();
                    Util.writeRemoteObject(out, result);
                    return out;
                }
            case 86:
                if (method.equals("getAllServiceNodeAvailable__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue")) {
                    String arg0 = (String) in.read_value(String.class);
                    String arg1 = (String) in.read_value(String.class);
                    String arg2 = (String) in.read_value(String.class);
                    ServiceBase[] result = target.getAllServiceNodeAvailable(arg0, arg1, arg2);
                    org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
                    out.write_value(cast_array(result), ServiceBase[].class);
                    return out;
                }
            case 90:
                if (method.equals("unregister__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue")) {
                    String arg0 = (String) in.read_value(String.class);
                    String arg1 = (String) in.read_value(String.class);
                    String arg2 = (String) in.read_value(String.class);
                    String arg3 = (String) in.read_value(String.class);
                    String result = target.unregister(arg0, arg1, arg2, arg3);
                    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 144:
                if (method.equals("service__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse")) {
                    JSession arg0 = (JSession) in.read_value(JSession.class);
                    HttpSession arg1 = (HttpSession) in.read_value(HttpSession.class);
                    HttpServletRequest arg2 = (HttpServletRequest) in.read_value(HttpServletRequest.class);
                    HttpServletResponse arg3 = (HttpServletResponse) in.read_value(HttpServletResponse.class);
                    target.service(arg0, arg1, arg2, arg3);
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 145:
                if (method.equals("register__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse")) {
                    JSession arg0 = (JSession) in.read_value(JSession.class);
                    HttpSession arg1 = (HttpSession) in.read_value(HttpSession.class);
                    HttpServletRequest arg2 = (HttpServletRequest) in.read_value(HttpServletRequest.class);
                    HttpServletResponse arg3 = (HttpServletResponse) in.read_value(HttpServletResponse.class);
                    target.register(arg0, arg1, arg2, arg3);
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 146:
                if (method.equals("heartbeat__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse")) {
                    JSession arg0 = (JSession) in.read_value(JSession.class);
                    HttpSession arg1 = (HttpSession) in.read_value(HttpSession.class);
                    HttpServletRequest arg2 = (HttpServletRequest) in.read_value(HttpServletRequest.class);
                    HttpServletResponse arg3 = (HttpServletResponse) in.read_value(HttpServletResponse.class);
                    target.heartbeat(arg0, arg1, arg2, arg3);
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 147:
                if (method.equals("unregister__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse")) {
                    JSession arg0 = (JSession) in.read_value(JSession.class);
                    HttpSession arg1 = (HttpSession) in.read_value(HttpSession.class);
                    HttpServletRequest arg2 = (HttpServletRequest) in.read_value(HttpServletRequest.class);
                    HttpServletResponse arg3 = (HttpServletResponse) in.read_value(HttpServletResponse.class);
                    target.unregister(arg0, arg1, arg2, arg3);
                    OutputStream out = reply.createReply();
                    return out;
                }
            case 148:
                if (method.equals("register__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue__CORBA_WStringValue")) {
                    String arg0 = (String) in.read_value(String.class);
                    String arg1 = (String) in.read_value(String.class);
                    String arg2 = (String) in.read_value(String.class);
                    String arg3 = (String) in.read_value(String.class);
                    String arg4 = (String) in.read_value(String.class);
                    String arg5 = (String) in.read_value(String.class);
                    String arg6 = (String) in.read_value(String.class);
                    String result = target.register(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
                    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 163:
                if (method.equals("getAllServiceNodeAvailable__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse")) {
                    JSession arg0 = (JSession) in.read_value(JSession.class);
                    HttpSession arg1 = (HttpSession) in.read_value(HttpSession.class);
                    HttpServletRequest arg2 = (HttpServletRequest) in.read_value(HttpServletRequest.class);
                    HttpServletResponse arg3 = (HttpServletResponse) in.read_value(HttpServletResponse.class);
                    target.getAllServiceNodeAvailable(arg0, arg1, arg2, arg3);
                    OutputStream out = reply.createReply();
                    return out;
                }
        }
        throw new BAD_OPERATION();
    } catch (SystemException ex) {
        throw ex;
    } catch (Throwable ex) {
        throw new UnknownException(ex);
    }
}
Also used : InputStream(org.omg.CORBA.portable.InputStream) HttpSession(javax.servlet.http.HttpSession) OutputStream(org.omg.CORBA.portable.OutputStream) HttpServletResponse(javax.servlet.http.HttpServletResponse) JSession(j.app.webserver.JSession) HttpServletRequest(javax.servlet.http.HttpServletRequest) SystemException(org.omg.CORBA.SystemException) ServiceBase(j.service.server.ServiceBase) UnknownException(org.omg.CORBA.portable.UnknownException) BAD_OPERATION(org.omg.CORBA.BAD_OPERATION)

Example 4 with JSession

use of j.app.webserver.JSession in project JFramework by gugumall.

the class _JRouter_Stub method service.

public void service(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("service__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) {
                service(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("service__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", JRouter.class);
        if (so == null) {
            service(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).service(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 5 with JSession

use of j.app.webserver.JSession in project JFramework by gugumall.

the class _JRouter_Stub method heartbeat.

public void heartbeat(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("heartbeat__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) {
                heartbeat(arg0, arg1, arg2, arg3);
            } finally {
                _releaseReply(in);
            }
        } catch (SystemException ex) {
            throw Util.mapSystemException(ex);
        }
    } else {
        ServantObject so = _servant_preinvoke("heartbeat__j_app_webserver_JSession__javax_servlet_http_HttpSession__javax_servlet_http_HttpServletRequest__javax_servlet_http_HttpServletResponse", JRouter.class);
        if (so == null) {
            heartbeat(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).heartbeat(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

JSession (j.app.webserver.JSession)8 HttpServletRequest (javax.servlet.http.HttpServletRequest)8 HttpServletResponse (javax.servlet.http.HttpServletResponse)8 HttpSession (javax.servlet.http.HttpSession)8 SystemException (org.omg.CORBA.SystemException)8 InputStream (org.omg.CORBA.portable.InputStream)8 OutputStream (org.omg.CORBA.portable.OutputStream)8 UnexpectedException (java.rmi.UnexpectedException)7 ApplicationException (org.omg.CORBA.portable.ApplicationException)7 RemarshalException (org.omg.CORBA.portable.RemarshalException)7 ServantObject (org.omg.CORBA.portable.ServantObject)7 PortableRemoteObject (javax.rmi.PortableRemoteObject)5 ServiceBase (j.service.server.ServiceBase)1 BAD_OPERATION (org.omg.CORBA.BAD_OPERATION)1 UnknownException (org.omg.CORBA.portable.UnknownException)1