Package org.apache.cayenne.remote

Examples of org.apache.cayenne.remote.RemoteSession


    protected RemoteSession createRemoteSession(
            String sessionId,
            String name,
            boolean enableEvents) {
        RemoteSession session = (enableEvents) ? new RemoteSession(
                sessionId,
                eventBridgeFactoryName,
                eventBridgeParameters) : new RemoteSession(sessionId);

        session.setName(name);
        return session;
    }
View Full Code Here


        // unfortunately we can't read response cookies without completely reimplementing
        // 'HessianProxy.invoke()'. Currently (3.0.13) it doesn't allow to cleanly
        // intercept response... so extract session id from the RemoteSession....

        // add session cookie
        RemoteSession session = clientConnection.getSession();
        if (session != null && session.getSessionId() != null) {
            connection.setRequestProperty("Cookie", SESSION_COOKIE_NAME
                    + "="
                    + session.getSessionId());
        }

        return connection;
    }
View Full Code Here

        // unfortunately we can't read response cookies without completely reimplementing
        // 'HessianProxy.invoke()'. Currently (3.0.13) it doesn't allow to cleanly
        // intercept response... so extract session id from the RemoteSession....

        // add session cookie
        RemoteSession session = clientConnection.getSession();
        if (session != null && session.getSessionId() != null) {
            connection.setRequestProperty("Cookie", SESSION_COOKIE_NAME
                    + "="
                    + session.getSessionId());
        }

        return connection;
    }
View Full Code Here

    protected ServerSession createServerSession() {

        HttpSession httpSession = getSession(true);

        DataChannel channel = createChannel();
        RemoteSession remoteSession = createRemoteSession(
                httpSession.getId(),
                null,
                false);
        ServerSession serverSession = new ServerSession(remoteSession, channel);
View Full Code Here

            else {
                logObj.debug("Joining existing shared channel: " + name);
            }
        }

        RemoteSession remoteSession = createRemoteSession(httpSession.getId(), name, true);

        ServerSession serverSession = new ServerSession(remoteSession, channel);
        httpSession.setAttribute(SESSION_ATTRIBUTE, serverSession);
        return serverSession;
    }
View Full Code Here

    protected abstract ServerSession getServerSession();

    public RemoteSession establishSession() {
        logObj.debug("Session requested by client");

        RemoteSession session = createServerSession().getSession();

        logObj.debug("Established client session: " + session);
        return session;
    }
View Full Code Here

    protected RemoteSession createRemoteSession(
            String sessionId,
            String name,
            boolean enableEvents) {
        RemoteSession session = (enableEvents) ? new RemoteSession(
                sessionId,
                eventBridgeFactoryName,
                eventBridgeParameters) : new RemoteSession(sessionId);

        session.setName(name);
        return session;
    }
View Full Code Here

    protected ServerSession createServerSession() {

        HttpSession httpSession = getSession(true);

        DataChannel channel = createChannel();
        RemoteSession remoteSession = createRemoteSession(
                httpSession.getId(),
                null,
                false);
        ServerSession serverSession = new ServerSession(remoteSession, channel);
View Full Code Here

            else {
                logObj.debug("Joining existing shared channel: " + name);
            }
        }

        RemoteSession remoteSession = createRemoteSession(httpSession.getId(), name, true);

        ServerSession serverSession = new ServerSession(remoteSession, channel);
        httpSession.setAttribute(SESSION_ATTRIBUTE, serverSession);
        return serverSession;
    }
View Full Code Here

    protected abstract ServerSession getServerSession();

    public RemoteSession establishSession() {
        logObj.debug("Session requested by client");

        RemoteSession session = createServerSession().getSession();

        logObj.debug("Established client session: " + session);
        return session;
    }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.remote.RemoteSession

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.