Examples of SessionListener


Examples of org.apache.jackrabbit.core.SessionListener

        this.pmList = list;
        this.persistenceManagerScan = list != null;
        this.sessionList = sessionList;

        // Auto-close if the main session logs out
        this.sessionListener = new SessionListener() {
            public void loggedOut(SessionImpl session) {
            }
            public void loggingOut(SessionImpl session) {
                close();
            }
View Full Code Here

Examples of org.apache.lenya.modules.monitoring.SessionListener

     */
    protected void initParameters() {
        super.initParameters();
        this.getSourceURL();

        SessionListener sessions = new SessionListener();
        WeakHashMap allSessions = sessions.getAllSessions();
        List userList = new ArrayList();

        Iterator userit = allSessions.entrySet().iterator();
        while (userit.hasNext()) {
            Map.Entry entry = (Map.Entry) userit.next();
View Full Code Here

Examples of org.apache.lenya.util.SessionListener

     */
    protected void initParameters() {
        super.initParameters();
        this.getSourceURL();

        SessionListener sessions = new SessionListener();
        WeakHashMap allSessions = sessions.getAllSessions();
        List userList = new ArrayList();

        Iterator userit = allSessions.entrySet().iterator();
        while (userit.hasNext()) {
            Map.Entry entry = (Map.Entry) userit.next();
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

    }

    @Test
    public void testSessionListenerStartNotification() {
        final boolean[] started = new boolean[1];
        SessionListener listener = new SessionListenerAdapter() {
            public void onStart(Session session) {
                started[0] = true;
            }
        };
        sm.getSessionListeners().add(listener);
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

    }

    @Test
    public void testSessionListenerStopNotification() {
        final boolean[] stopped = new boolean[1];
        SessionListener listener = new SessionListenerAdapter() {
            public void onStop(Session session) {
                stopped[0] = true;
            }
        };
        sm.getSessionListeners().add(listener);
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

    //causing a stack overflow exception.
    @Test
    public void testSessionListenerStopNotificationWithReadAttribute() {
        final boolean[] stopped = new boolean[1];
        final String[] value = new String[1];
        SessionListener listener = new SessionListenerAdapter() {
            public void onStop(Session session) {
                stopped[0] = true;
                value[0] = (String)session.getAttribute("foo");
            }
        };
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

    }

    @Test
    public void testSessionListenerExpiredNotification() {
        final boolean[] expired = new boolean[1];
        SessionListener listener = new SessionListenerAdapter() {
            public void onExpiration(Session session) {
                expired[0] = true;
            }
        };
        sm.getSessionListeners().add(listener);
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

        invalidSession.setLastAccessTime(past);
        invalidSession.setId(2);

        final AtomicInteger expirationCount = new AtomicInteger();

        SessionListener sessionListener = new SessionListenerAdapter() {
            @Override
            public void onExpiration(Session session) {
                expirationCount.incrementAndGet();
            }
        };
View Full Code Here

Examples of org.apache.shiro.session.SessionListener

     * Tests that no memory leak exists on invalid sessions: expired or stopped
     * Verifies <a href="https://issues.apache.org/jira/browse/SHIRO-399">SHIRO-399</a>.
     */
    @Test
    public void testNoMemoryLeakOnInvalidSessions() throws Exception {
        SessionListener sessionListener = new SessionListener() {
            public void onStart(Session session) {
                session.setAttribute("I love", "Romania");
            }

            public void onStop(Session session) {
View Full Code Here

Examples of org.apache.sshd.common.SessionListener

    public void testIdleTimeout() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        TestEchoShellFactory.TestEchoShell.latch = new CountDownLatch(1);

        sshd.getProperties().put(SshServer.IDLE_TIMEOUT, "2500");
        sshd.getSessionFactory().addListener(new SessionListener() {
            public void sessionCreated(Session session) {
                System.out.println("Session created");
            }
            public void sessionEvent(Session sesssion, Event event) {
                System.out.println("Session event: " + event);
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.