Examples of DetachListener


Examples of com.vaadin.server.ClientConnector.DetachListener

    @Test
    public void threadLocalsAfterUnderlyingSessionTimeout()
            throws InterruptedException {

        final AtomicBoolean detachCalled = new AtomicBoolean(false);
        ui.addDetachListener(new DetachListener() {
            @Override
            public void detach(DetachEvent event) {
                detachCalled.set(true);
                Assert.assertEquals(ui, UI.getCurrent());
                Assert.assertEquals(ui.getPage(), Page.getCurrent());
View Full Code Here

Examples of com.vaadin.server.ClientConnector.DetachListener

    }

    @Test
    public void threadLocalsAfterSessionDestroy() throws InterruptedException {
        final AtomicBoolean detachCalled = new AtomicBoolean(false);
        ui.addDetachListener(new DetachListener() {
            @Override
            public void detach(DetachEvent event) {
                detachCalled.set(true);
                Assert.assertEquals(ui, UI.getCurrent());
                Assert.assertEquals(ui.getPage(), Page.getCurrent());
View Full Code Here

Examples of com.vaadin.server.ClientConnector.DetachListener

import com.vaadin.ui.UI;

public class CleanupUI extends UI implements DetachListener {
    @Override
    protected void init(VaadinRequest request) {
        addDetachListener(new DetachListener() {
            @Override
            public void detach(DetachEvent event) {
                releaseSomeResources();
            }
        });
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.