Package kr.ac.konkuk.ccslab.cm.event
Class CMInterestEvent
java.lang.Object
kr.ac.konkuk.ccslab.cm.entity.CMObject
kr.ac.konkuk.ccslab.cm.event.CMEvent
kr.ac.konkuk.ccslab.cm.event.CMInterestEvent
This class represents CM events that are used when a user changes the group membership
or interacts with the other group members.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
The event ID for the request of joining a group in the default server.static final int
The event ID for leaving a group in the default server.static final int
static final int
The event ID for a chatting message in a group.Fields inherited from class kr.ac.konkuk.ccslab.cm.event.CMEvent
m_bytes, m_nByteNum, m_nID, m_strDistributionGroup, m_strDistributionSession, m_strHandlerGroup, m_strHandlerSession, m_strReceiver, m_strSender
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected int
Returns the current group name.Returns the host IP address.getTalk()
Returns the chatting message.int
Returns the UDP port number.Returns the user name.protected void
void
setCollideObj
(String oName) void
setCurrentGroup
(String gName) void
setHostAddress
(String host) void
setPassword
(String passwd) void
void
void
void
setUDPPort
(int port) void
setUserName
(String name) protected void
unmarshallBody
(ByteBuffer msg) Methods inherited from class kr.ac.konkuk.ccslab.cm.event.CMEvent
allocate, equals, getDistributionGroup, getDistributionSession, getHandlerGroup, getHandlerSession, getID, getInt2BytesFromByteBuffer, getReceiver, getSender, getStringFromByteBuffer, marshall, marshallHeader, putInt2BytesToByteBuffer, putStringToByteBuffer, setByteNum, setDistributionGroup, setDistributionSession, setHandlerGroup, setHandlerSession, setID, setReceiver, setSender, toString, unmarshall, unmarshallHeader
-
Field Details
-
USER_ENTER
public static final int USER_ENTERThe 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:- user name:
getUserName()
- IP address of the user host:
getHostAddress()
- UDP port number of the user:
getUDPPort()
- current group name of the user:
getCurrentGroup()
- See Also:
- user name:
-
USER_LEAVE
public static final int USER_LEAVEThe 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:- user name:
getUserName()
- See Also:
- user name:
-
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_TALKThe 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:- user name:
getUserName()
- chatting message:
getTalk()
- See Also:
- user name:
-
-
Constructor Details
-
CMInterestEvent
public CMInterestEvent() -
CMInterestEvent
-
-
Method Details
-
setUserName
-
getUserName
Returns the user name.- Returns:
- the user name.
-
setPassword
-
getPassword
-
setHostAddress
-
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
-
getCurrentGroup
Returns the current group name.- Returns:
- the current group name.
-
setTalk
-
getTalk
Returns the chatting message.- Returns:
- the chatting message.
-
setPoint3f
-
getPoint3f
-
setPosition
-
getPosition
-
setCollideObj
-
getCollideObj
-
getByteNum
protected int getByteNum()- Overrides:
getByteNum
in classCMEvent
-
marshallBody
protected void marshallBody()- Specified by:
marshallBody
in classCMEvent
-
unmarshallBody
- Specified by:
unmarshallBody
in classCMEvent
-