Package org.jboss.dashboard.ui.controller

Examples of org.jboss.dashboard.ui.controller.ControllerListener


     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Catch the user preferred language.
        PreferredLocale preferredLocale =  getPreferredLocale(getRequest());
        LocaleManager.lookup().setCurrentLocale(preferredLocale.asLocale());

        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here


     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here

     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here

     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Catch the user preferred language.
        PreferredLocale preferredLocale =  getPreferredLocale();
        LocaleManager.lookup().setCurrentLocale(preferredLocale.asLocale());

        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here

     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Catch the user preferred language.
        PreferredLocale preferredLocale =  getPreferredLocale();
        LocaleManager.lookup().setCurrentLocale(preferredLocale.asLocale());

        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here

     * the event to all the listeners registered.
     */
    protected void initSession() {
        log.debug("New session created. Firing event");
        for (int i = 0; i < listeners.length; i++) {
            ControllerListener listener = listeners[i];
            listener.initSession(getRequest(), getResponse());
        }
        // Store a HttpBindingListener object to detect session expiration
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_BIND_LISTENER, new HttpSessionBindingListener() {
            public void valueBound(HttpSessionBindingEvent httpSessionBindingEvent) {
            }

            public void valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) {
                for (int i = 0; i < listeners.length; i++) {
                    ControllerListener listener = listeners[i];
                    listener.expireSession(httpSessionBindingEvent.getSession());
                }
            }
        });
        getRequest().getSession().setAttribute(SESSION_ATTRIBUTE_INITIALIZED, "true");
    }
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.ui.controller.ControllerListener

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.