Package io.undertow.servlet.api.SessionPersistenceManager

Examples of io.undertow.servlet.api.SessionPersistenceManager.PersistentSession


                        sessionData.put(attr, attribute);
                        if (attribute instanceof HttpSessionActivationListener) {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        }
                    }
                    objectData.put(sessionId, new PersistentSession(new Date(session.getLastAccessedTime() + (session.getMaxInactiveInterval() * 1000)), sessionData));
                }
            }
            sessionPersistenceManager.persistSessions(deploymentName, objectData);
            this.data.clear();
        } finally {
View Full Code Here


            next.handleRequest(exchange);
            return;
        }

        //we have some old data
        PersistentSession result = data.remove(incomingSessionId);
        if (result != null) {
            long time = System.currentTimeMillis();
            if (time < result.getExpiration().getTime()) {
                final HttpSessionImpl session = servletContext.getSession(exchange, true);
                final HttpSessionEvent event = new HttpSessionEvent(session);
                for (Map.Entry<String, Object> entry : result.getSessionData().entrySet()) {

                    if (entry.getValue() instanceof HttpSessionActivationListener) {
                        ((HttpSessionActivationListener) entry.getValue()).sessionWillPassivate(event);
                    }
                    session.setAttribute(entry.getKey(), entry.getValue());
View Full Code Here

                        sessionData.put(attr, attribute);
                        if (attribute instanceof HttpSessionActivationListener) {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        }
                    }
                    objectData.put(sessionId, new PersistentSession(new Date(session.getLastAccessedTime() + (session.getMaxInactiveInterval() * 1000)), sessionData));
                }
            }
            sessionPersistenceManager.persistSessions(deploymentName, objectData);
            this.data.clear();
        } finally {
View Full Code Here

            next.handleRequest(exchange);
            return;
        }

        //we have some old data
        PersistentSession result = data.remove(incomingSessionId);
        if (result != null) {
            long time = System.currentTimeMillis();
            if (time < result.getExpiration().getTime()) {
                final HttpSessionImpl session = servletContext.getSession(exchange, true);
                final HttpSessionEvent event = new HttpSessionEvent(session);
                for (Map.Entry<String, Object> entry : result.getSessionData().entrySet()) {

                    if (entry.getValue() instanceof HttpSessionActivationListener) {
                        ((HttpSessionActivationListener) entry.getValue()).sessionWillPassivate(event);
                    }
                    session.setAttribute(entry.getKey(), entry.getValue());
View Full Code Here

                        sessionData.put(attr, attribute);
                        if (attribute instanceof HttpSessionActivationListener) {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        }
                    }
                    objectData.put(sessionId, new PersistentSession(new Date(session.getLastAccessedTime() + (session.getMaxInactiveInterval() * 1000)), sessionData));
                }
            }
            sessionPersistenceManager.persistSessions(deploymentName, objectData);
            this.data.clear();
        } finally {
View Full Code Here

            next.handleRequest(exchange);
            return;
        }

        //we have some old data
        PersistentSession result = data.remove(incomingSessionId);
        if (result != null) {
            long time = System.currentTimeMillis();
            if (time < result.getExpiration().getTime()) {
                final HttpSessionImpl session = servletContext.getSession(exchange, true);
                final HttpSessionEvent event = new HttpSessionEvent(session);
                for (Map.Entry<String, Object> entry : result.getSessionData().entrySet()) {

                    if (entry.getValue() instanceof HttpSessionActivationListener) {
                        ((HttpSessionActivationListener) entry.getValue()).sessionDidActivate(event);
                    }
                    if(entry.getKey().startsWith(HttpSessionImpl.IO_UNDERTOW)) {
View Full Code Here

                        sessionData.put(attr, attribute);
                        if (attribute instanceof HttpSessionActivationListener) {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        }
                    }
                    objectData.put(sessionId, new PersistentSession(new Date(session.getLastAccessedTime() + (session.getMaxInactiveInterval() * 1000)), sessionData));
                }
            }
            sessionPersistenceManager.persistSessions(deploymentName, objectData);
            this.data.clear();
        } finally {
View Full Code Here

            next.handleRequest(exchange);
            return;
        }

        //we have some old data
        PersistentSession result = data.remove(incomingSessionId);
        if (result != null) {
            long time = System.currentTimeMillis();
            if (time < result.getExpiration().getTime()) {
                final HttpSessionImpl session = servletContext.getSession(exchange, true);
                final HttpSessionEvent event = new HttpSessionEvent(session);
                for (Map.Entry<String, Object> entry : result.getSessionData().entrySet()) {

                    if (entry.getValue() instanceof HttpSessionActivationListener) {
                        ((HttpSessionActivationListener) entry.getValue()).sessionWillPassivate(event);
                    }
                    session.setAttribute(entry.getKey(), entry.getValue());
View Full Code Here

                        sessionData.put(attr, attribute);
                        if (attribute instanceof HttpSessionActivationListener) {
                            ((HttpSessionActivationListener) attribute).sessionWillPassivate(event);
                        }
                    }
                    objectData.put(sessionId, new PersistentSession(new Date(session.getLastAccessedTime() + (session.getMaxInactiveInterval() * 1000)), sessionData));
                }
            }
            sessionPersistenceManager.persistSessions(deploymentName, objectData);
            this.data.clear();
        } finally {
View Full Code Here

            next.handleRequest(exchange);
            return;
        }

        //we have some old data
        PersistentSession result = data.remove(incomingSessionId);
        if (result != null) {
            long time = System.currentTimeMillis();
            if (time < result.getExpiration().getTime()) {
                final HttpSessionImpl session = servletContext.getSession(exchange, true);
                final HttpSessionEvent event = new HttpSessionEvent(session);
                for (Map.Entry<String, Object> entry : result.getSessionData().entrySet()) {

                    if (entry.getValue() instanceof HttpSessionActivationListener) {
                        ((HttpSessionActivationListener) entry.getValue()).sessionWillPassivate(event);
                    }
                    session.setAttribute(entry.getKey(), entry.getValue());
View Full Code Here

TOP

Related Classes of io.undertow.servlet.api.SessionPersistenceManager.PersistentSession

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.