Class GuessCharacterAction

java.lang.Object
org.apache.struts2.ActionSupport
org.apache.struts2.showcase.hangman.GuessCharacterAction
All Implemented Interfaces:
Serializable, Action, SessionAware, ValidationAware, LocaleProvider, TextProvider, Validateable

public class GuessCharacterAction extends ActionSupport implements SessionAware
See Also:
  • Constructor Details

    • GuessCharacterAction

      public GuessCharacterAction()
  • Method Details

    • execute

      public String execute() throws Exception
      Description copied from class: ActionSupport
      A default implementation that does nothing an returns "success".

      Subclasses should override this method to provide their business logic.

      See also Action.execute().

      Specified by:
      execute in interface Action
      Overrides:
      execute in class ActionSupport
      Returns:
      returns Action.SUCCESS
      Throws:
      Exception - can be thrown by subclasses.
    • getHangman

      public Hangman getHangman()
    • setCharacter

      public void setCharacter(Character character)
    • getCharacter

      public Character getCharacter()
    • withSession

      public void withSession(Map<String,Object> session)
      Description copied from interface: SessionAware
      Applies the Map of session attributes in the implementing class.
      Specified by:
      withSession in interface SessionAware
      Parameters:
      session - a Map of HTTP session attribute name/value pairs.