lilypad.client.connect.api
Class MessageEvent

java.lang.Object
  extended by 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)
           
 
Method Summary
 java.lang.String getChannel()
           
 byte[] getMessage()
           
 java.lang.String getMessageAsString()
           
 java.lang.String getSender()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageEvent

public MessageEvent(java.lang.String sender,
                    java.lang.String channel,
                    byte[] message)
Parameters:
sender - of the event
channel - of the event
message - of the event
Method Detail

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