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

ChatLoginAction

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

Fields Summary
private static final long
serialVersionUID
private ChatService
chatService
private Map
session
private String
name
Constructors Summary
public ChatLoginAction(ChatService chatService)


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

        try {
            chatService.login(new User(name));
            session.put(ChatAuthenticationInterceptor.USER_SESSION_KEY, new User(name));
        }
        catch(ChatException e) {
            e.printStackTrace();
            addActionError(e.getMessage());
            return INPUT;
        }
        return SUCCESS;
    
public java.lang.StringgetName()

        return this.name;
    
public voidsetName(java.lang.String name)

        this.name = name;
    
public voidsetSession(java.util.Map session)

        this.session = session;