Class UserActionMessage

java.lang.Object
thijzert.chatty.message.UserActionMessage
All Implemented Interfaces:
Serializable, Message

public final class UserActionMessage extends Object implements Message
A server message that tells about an action a user did (connecting to the server or quitting).
Author:
Thijzert
See Also:
  • Field Details

  • Constructor Details

    • UserActionMessage

      public UserActionMessage(UserInfo user, UserActionMessage.UserAction userAction)
      This constructor initializes the UserActionMessage.
      Parameters:
      user - the user this message is about
      userAction - the action the user executed
  • Method Details

    • getUser

      public UserInfo getUser()
      Returns the user this message is about.
      Returns:
      the user this message is about
    • getAction

      public UserActionMessage.UserAction getAction()
      Returns the action this message is about.
      Returns:
      the action this message is about
    • toString

      public String toString()
      Returns a summary of the UserActionMessage.
      Overrides:
      toString in class Object
      Returns:
      a summary of the UserActionMessage