Chat Room Message Handler

org.eclipse.ecf.presence.bot.chatRoomMessageHandler

1.0.0 milestone 6

This extension point allows message handlers to be associated with a given chatroomrobot (via chatroomrobotid attribute). Note that the chatroomrobotid must exist or the handler will not be called.

<!ELEMENT extension (handler)+>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT handler EMPTY>

<!ATTLIST handler

chatRoomRobotId  CDATA #REQUIRED

filterExpression CDATA #IMPLIED

class            CDATA #REQUIRED>

The chat room message handler



   

<extension point=

"org.eclipse.ecf.presence.bot.chatRoomMessageHandler"

>

<handler chatRoomRobotId=

"org.eclipse.ecf.presence.bot.defaultbot"

class=

"org.eclipse.ecf.presence.bot.DefaultChatRoomMessageHandler"

>

</handler>

</extension>

Note that the given chatroomrobotid=org.eclipse.ecf.presence.bot.defaultbot must be previously defined via the chatroomrobot extension point. Here is an example:
   

<extension point=

"org.eclipse.ecf.presence.bot.chatRoomRobot"

>

<chatRoomRobot chat chatRoom=

"#eclipse-ecf"

connectId=

"irc://slewis2_@irc.freenode.net"

containerFactoryName=

"ecf.irc.irclib"

id=

"org.eclipse.ecf.presence.bot.defaultbot"

>

</chatRoomRobot>

</extension>

The class implementation provided in extension point must implement the following interface:
public interface IChatRoomMessageHandler extends IChatRoomContainerAdvisor {

 /**
  * This method is called when a {@link IChatRoomMessage} is received.
  * 
  * @param message
  *            the {@link IChatRoomMessage} received. Will not be
  *            

<code>

null

</code>

. Implementers should not block the * calling thread. Any methods on the given

<code>

message

</code>

* parameter may be called. */ public void handleRoomMessage(IChatRoomMessage message); }

No supplied implementation.