
56 Lotus Instant Messaging/Web Conferencing (Sametime): Building Sametime-Enabled Applications
method returns the word the end user is searching for. The bot then calls specific
functions to determine the meaning of the word, and sends that meaning back to
the end user with the sendText() method of the Im object:
public void textReceived(ImEvent e)
{
String dictionaryWord = e.getText();
String wordMeaning = botDictionaryLogic(dictionaryWord);
e.getIm().sendText(true, wordMeaning);
}
3.3 Bot examples
This section details three bots developed using the Java Client Toolkit. The first,
the Echo Bot, is a Java application that simply echoes back any te