lilypad.client.connect.api
Class MessageEvent
java.lang.Object
lilypad.client.connect.api.MessageEvent
public class MessageEvent
- extends java.lang.Object
Called when a message has been received by the session.
Constructor Summary |
MessageEvent(java.lang.String sender,
java.lang.String channel,
byte[] message)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageEvent
public MessageEvent(java.lang.String sender,
java.lang.String channel,
byte[] message)
- Parameters:
sender
- of the eventchannel
- of the eventmessage
- of the event
getSender
public java.lang.String getSender()
- Returns:
- sender of the message
getChannel
public java.lang.String getChannel()
- Returns:
- channel to identify the message
getMessage
public byte[] getMessage()
- Returns:
- message
getMessageAsString
public java.lang.String getMessageAsString()
throws java.io.UnsupportedEncodingException
- Returns:
- message represented as a UTF-8 string
- Throws:
java.io.UnsupportedEncodingException
- if the message can not be represented as a UTF-8 string