Class CMInterestEvent


public class CMInterestEvent extends CMEvent
This class represents CM events that are used when a user changes the group membership or interacts with the other group members.
  • Field Details

    • USER_ENTER

      public static final int USER_ENTER
      The event ID for the request of joining a group in the default server.

      event direction: client -> default server

      A client sends the USER_ENTER event after it processes CMSessionEvent.JOIN_SESSION_ACK. This event is also sent when the user changes his/her current group.
      The following fields are used for this event:

      See Also:
    • USER_LEAVE

      public static final int USER_LEAVE
      The event ID for leaving a group in the default server.

      event direction: client -> default server

      A client sends the USER_LEAVE event when it leaves the current group so that it can enter a new group.
      The following field is used for this event:

      See Also:
    • USER_MOVE

      public static final int USER_MOVE
      See Also:
    • USER_COLLIDE

      public static final int USER_COLLIDE
      See Also:
    • USER_TALK

      public static final int USER_TALK
      The event ID for a chatting message in a group.

      event direction: client -> server, client -> client

      The USER_TALK event is sent when a client which is a group member calls CMClientStub.chat(String, String).
      The following fields are used for this event:

      See Also:
  • Constructor Details

    • CMInterestEvent

      public CMInterestEvent()
    • CMInterestEvent

      public CMInterestEvent(ByteBuffer msg)
  • Method Details

    • setUserName

      public void setUserName(String name)
    • getUserName

      public String getUserName()
      Returns the user name.
      Returns:
      the user name.
    • setPassword

      public void setPassword(String passwd)
    • getPassword

      public String getPassword()
    • setHostAddress

      public void setHostAddress(String host)
    • getHostAddress

      public String getHostAddress()
      Returns the host IP address.
      Returns:
      the host IP address.
    • setUDPPort

      public void setUDPPort(int port)
    • getUDPPort

      public int getUDPPort()
      Returns the UDP port number.
      Returns:
      the UDP port number.
    • setCurrentGroup

      public void setCurrentGroup(String gName)
    • getCurrentGroup

      public String getCurrentGroup()
      Returns the current group name.
      Returns:
      the current group name.
    • setTalk

      public void setTalk(String talk)
    • getTalk

      public String getTalk()
      Returns the chatting message.
      Returns:
      the chatting message.
    • setPoint3f

      public void setPoint3f(CMPoint3f p)
    • getPoint3f

      public CMPoint3f getPoint3f()
    • setPosition

      public void setPosition(CMPosition pq)
    • getPosition

      public CMPosition getPosition()
    • setCollideObj

      public void setCollideObj(String oName)
    • getCollideObj

      public String getCollideObj()
    • getByteNum

      protected int getByteNum()
      Overrides:
      getByteNum in class CMEvent
    • marshallBody

      protected void marshallBody()
      Specified by:
      marshallBody in class CMEvent
    • unmarshallBody

      protected void unmarshallBody(ByteBuffer msg)
      Specified by:
      unmarshallBody in class CMEvent