blob: 297d07dbe253a0e3baf5638bed8730e81666e20b [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.ecf.presence.bot">
<annotation>
<appInfo>
<meta.schema plugin="org.eclipse.ecf.presence.bot" id="imMessageHandler" name="IM Message Handler"/>
</appInfo>
<documentation>
This extension point allows message handler objects to be associated
with imrobot instances.
</documentation>
</annotation>
<element name="extension">
<complexType>
<sequence>
<element ref="handler" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
</documentation>
<appInfo>
<meta.attribute translatable="true"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="handler">
<annotation>
<documentation>
The im message handler
</documentation>
</annotation>
<complexType>
<attribute name="imRobotId" type="string" use="required">
<annotation>
<documentation>
Required imRobotId. The value of this field must match a imrobot id
</documentation>
</annotation>
</attribute>
<attribute name="filterExpression" type="string">
<annotation>
<documentation>
Optional filter expression. If filterExpression is provided, then chatroom messages will be filtered via given regular expression. If match, then the handleChatRoomMessage method will be called. If not matched, then the received message will be ignored.
</documentation>
</annotation>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
The class of the message handler instance to create. Must implement &lt;b&gt;org.eclipse.ecf.presence.bot.IIMMessageHandler&lt;/b&gt;.
</documentation>
<appInfo>
<meta.attribute kind="java" basedOn="org.eclipse.ecf.presence.bot.IIMMessageHandler"/>
</appInfo>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appInfo>
<meta.section type="since"/>
</appInfo>
<documentation>
1.0.0 milestone 6
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="examples"/>
</appInfo>
<documentation>
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.presence.bot.imMessageHandler&quot;&gt;
&lt;handler
imrobotid=&quot;org.eclipse.ecf.presence.imbot.defaultbot&quot;
class=&quot;org.eclipse.ecf.presence.imbot.DefaultIMMessageHandler&quot;&gt;
&lt;/handler&gt;
&lt;/extension&gt;
&lt;/pre&gt;
Note that the given imrobotid=&lt;b&gt;org.eclipse.ecf.presence.imbot.defaultbot&lt;/b&gt; must be previously defined via the imrobot extension point. Here is an example:
&lt;pre&gt;
&lt;extension
point=&quot;org.eclipse.ecf.presence.bot.imRobot&quot;&gt;
&lt;imRobot
connectID=&quot;slewis@ecf.eclipse.org&quot;
containerFactoryName=&quot;ecf.xmpp.smack&quot;
id=&quot;org.eclipse.ecf.presence.imbot.defaultbot&quot;/&gt;
&lt;/imRobot&gt;
&lt;/extension&gt;
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="apiInfo"/>
</appInfo>
<documentation>
The class implementation provided in extension point must implement the following interface:
&lt;pre&gt;
public interface IIMMessageHandler extends IContainerAdvisor {
/**
* This method is called when a {@link IChatMessage} is received.
*
* @param message
* the {@link IChatMessage} received. Will not be
* &lt;code&gt;null&lt;/code&gt;. Implementers should not block the
* calling thread. Any methods on the given &lt;code&gt;message&lt;/code&gt;
* parameter may be called.
*/
public void handleIMMessage(IChatMessage message);
}
&lt;/pre&gt;
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="implementation"/>
</appInfo>
<documentation>
No supplied implementation.
</documentation>
</annotation>
<annotation>
<appInfo>
<meta.section type="copyright"/>
</appInfo>
<documentation>
Copyright (c) 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
</documentation>
</annotation>
</schema>