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

EnterRoomAction

public class EnterRoomAction 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
roomName
Constructors Summary
public EnterRoomAction(ChatService chatService)

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


        User user = (User) session.get(ChatAuthenticationInterceptor.USER_SESSION_KEY);
        try {
            chatService.enterRoom(user, roomName);
        }
        catch(Exception e) {
            addActionError(e.getMessage());
        }
        return SUCCESS;
    
public java.lang.StringgetRoomName()


        return this.roomName; 
public voidsetRoomName(java.lang.String roomName)

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

        this.session = session;