Examples of NettyHttpSession


Examples of org.apache.cxf.transport.http.netty.server.servlet.NettyHttpSession

        Collection<Cookie> cookies = Utils.getCookies(
                NettyHttpSession.SESSION_ID_KEY, request);
        if (cookies != null) {
            for (Cookie cookie : cookies) {
                String jsessionId = cookie.getValue();
                NettyHttpSession s = HttpSessionThreadLocal.getSessionStore()
                        .findSession(jsessionId);
                if (s != null) {
                    HttpSessionThreadLocal.set(s);
                    this.sessionRequestedByCookie = true;
                    break;
View Full Code Here

Examples of org.apache.cxf.transport.http.netty.server.servlet.NettyHttpSession

    @Override
    public void onRequestSuccessed(ChannelHandlerContext ctx,
                                   HttpResponse response) {

        NettyHttpSession s = HttpSessionThreadLocal.get();
        if (s != null && !this.sessionRequestedByCookie) {
            // setup the Cookie for session
            HttpHeaders.addHeader(response, Names.SET_COOKIE, 
                                  ClientCookieEncoder.encode(NettyHttpSession.SESSION_ID_KEY, s.getId()));
        }

    }
View Full Code Here

Examples of org.apache.cxf.transport.http.netty.server.servlet.NettyHttpSession

    @Override
    public NettyHttpSession createSession() {
        String sessionId = this.generateNewSessionId();
        LOG.log(Level.FINE, "Creating new session with id {}", sessionId);

        NettyHttpSession session = new NettyHttpSession(sessionId);
        SESSIONS.put(sessionId, session);
        return session;
    }
View Full Code Here

Examples of org.apache.cxf.transport.http.netty.server.servlet.NettyHttpSession

    }

    @Override
    public void destroyInactiveSessions() {
        for (Map.Entry<String, NettyHttpSession> entry : SESSIONS.entrySet()) {
            NettyHttpSession session = entry.getValue();
            if (session.getMaxInactiveInterval() < 0) {
                continue;
            }
           
            long currentMillis = System.currentTimeMillis();

            if (currentMillis - session.getLastAccessedTime() > session
                    .getMaxInactiveInterval() * 1000) {

                destroySession(entry.getKey());
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.