|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEventObject
SessionEvent
SessionChatEvent
Represents a chatroom event.
  | getFrom | getChatUser | getChatUsers | getLobby | getMessage |
chatLogonReceived | y[1] | y[1] | y | y | n |
chatLogoffReceived | y[1] | y[1] | y | y | n |
chatMessageReceived | y | y | y[2] | y | y |
The protocol supports the ability to deliver multiple users in each
chat packet, but an examination of actual chat packets reveals this
feature appears not to be used. So with that in mind...
[1] = to be super-safe it is best to use the array version of this
get method, and not to assume there will be only one user.
[2] = there is no way a single message can come from multiple users,
so it is safe to use the single user get method if you want.
Field Summary |
Fields inherited from class EventObject |
source |
Constructor Summary | |
SessionChatEvent(Object o,
int sz,
YahooChatLobby ycl)
Create a new instance. |
|
SessionChatEvent(Object o,
YahooChatUser ycu,
String m,
YahooChatLobby ycl)
Create a new instance. |
Method Summary | |
YahooChatUser |
getChatUser()
Returns a single chat user (actually just the first user in the array of users specified) relating to this event. |
YahooChatUser[] |
getChatUsers()
Returns an array of chat users relating to this event. |
String |
getFrom()
Returns the id of a single chat user relating to this event. |
YahooChatLobby |
getLobby()
Returns the chat lobby relating to this event. |
boolean |
isEmote()
Returns true if this message is an emote. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class SessionEvent |
getMessage, getStatus, getTimestamp, getTo |
Methods inherited from class EventObject |
getSource |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SessionChatEvent(Object o, int sz, YahooChatLobby ycl)
o
- source of event (Session
)sz
- number of users in eventycl
- lobby object for this eventpublic SessionChatEvent(Object o, YahooChatUser ycu, String m, YahooChatLobby ycl)
o
- source of event (Session
)ycu
- the chat user object for this eventm
- message text (UTF-8)ycl
- lobby object for this eventMethod Detail |
public YahooChatUser getChatUser()
public YahooChatUser[] getChatUsers()
public YahooChatLobby getLobby()
public String getFrom()
getUser().getId()
. This method is
suitable for message receiving events.
getFrom
in class SessionEvent
public boolean isEmote()
public String toString()
toString
in class SessionEvent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |