Class CMDataEvent


public class CMDataEvent extends CMEvent
This class represents CM events that are used for notifying a new group user or existing group members of the information of group membership change.
  • Field Details

    • INHABITANT

      public static final int INHABITANT
      The event ID for sending an existing group user from a server to a new group user.

      event direction: server -> client

      The server CM sends the INHABITANT event to the client CM of the new group user after the server processes the CMInterestEvent.USER_ENTER event.
      The following fields are used for this event:

      See Also:
    • NEW_USER

      public static final int NEW_USER
      The event ID for sending new group user information from a server to existing group members.

      event direction: server -> client

      The server CM sends the NEW_USER event to the existing group members right after the server sends the INHABITANT events.
      The following fields are used for this event:

      See Also:
    • REMOVE_USER

      public static final int REMOVE_USER
      The event ID for sending a group-leaving user information from a server to the group members.

      event direction: server -> client

      The server CM sends the REMOVE_USER event to the group members after it processes the CMInterestEvent.USER_LEAVE event.
      The following fields are used for this event:

      See Also:
    • REQUEST_INHABITANT

      public static final int REQUEST_INHABITANT
      See Also:
  • Constructor Details

    • CMDataEvent

      public CMDataEvent()
    • CMDataEvent

      public CMDataEvent(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.
    • setPosition

      public void setPosition(CMPosition pq)
    • getPosition

      public CMPosition getPosition()
    • 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