List of usage examples for com.vaadin.server WrappedSession invalidate
public void invalidate();
From source file:org.ikasan.dashboard.ui.framework.action.LogoutAction.java
License:BSD License
@Override public void exectuteAction() { VaadinService.getCurrentRequest().getWrappedSession().setAttribute(DashboardSessionValueConstants.USER, null);/*from w w w.ja v a 2 s. c o m*/ this.visibilityGroup.setVisible(); this.editableGroup.setEditable(false); layout.removeComponent(this.logOutButton); layout.addComponent(this.loginButton, 2, 0); layout.addComponent(this.setupButton, 3, 0); layout.setComponentAlignment(this.setupButton, Alignment.MIDDLE_RIGHT); layout.setComponentAlignment(this.loginButton, Alignment.MIDDLE_RIGHT); this.layout.removeComponent(userLabel); VaadinSession vSession = VaadinSession.getCurrent(); WrappedSession httpSession = vSession.getSession(); this.navigationPanel.reset(); //Invalidate HttpSession httpSession.invalidate(); vSession.close(); //Redirect the user to the login/default Page Page.getCurrent().setLocation("/ikasan-dashboard"); }