FileDocCategorySizeDatePackage
ChatLogoutAction.javaAPI DocApache Struts 2.0.9 Apps1842Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.chat

ChatLogoutAction

public class ChatLogoutAction extends com.opensymphony.xwork2.ActionSupport implements org.apache.struts2.interceptor.SessionAware

Fields Summary
private static final long
serialVersionUID
private ChatService
chatService
private Map
session
Constructors Summary
public ChatLogoutAction(ChatService chatService)



       
        this.chatService = chatService;
    
Methods Summary
public java.lang.Stringexecute()


        User user = (User) session.get(ChatAuthenticationInterceptor.USER_SESSION_KEY);
        if (user != null) {
            chatService.logout(user.getName());
            session.remove(ChatAuthenticationInterceptor.USER_SESSION_KEY);
        }

        return SUCCESS;
    
public voidsetSession(java.util.Map session)

        this.session = session;