use of org.eclipse.ecf.presence.bot.IIMMessageHandlerEntry in project ecf by eclipse.
the class IMBot method fireInitBot.
protected void fireInitBot() {
List commands = bot.getCommands();
for (int i = 0; i < commands.size(); i++) {
IIMMessageHandlerEntry entry = (IIMMessageHandlerEntry) commands.get(i);
entry.getHandler().init(bot);
}
}
use of org.eclipse.ecf.presence.bot.IIMMessageHandlerEntry in project ecf by eclipse.
the class IMBot method firePreConnect.
protected void firePreConnect() {
List commands = bot.getCommands();
for (int i = 0; i < commands.size(); i++) {
IIMMessageHandlerEntry entry = (IIMMessageHandlerEntry) commands.get(i);
entry.getHandler().preContainerConnect(container, targetID);
}
}
use of org.eclipse.ecf.presence.bot.IIMMessageHandlerEntry in project ecf by eclipse.
the class IMBot method handleMessageEvent.
public void handleMessageEvent(IIMMessageEvent event) {
if (event instanceof IChatMessageEvent) {
IChatMessageEvent imEvent = (IChatMessageEvent) event;
IChatMessage message = imEvent.getChatMessage();
List commands = bot.getCommands();
for (int i = 0; i < commands.size(); i++) {
IIMMessageHandlerEntry entry = (IIMMessageHandlerEntry) commands.get(i);
entry.handleIMMessage(message);
}
}
}
Aggregations