10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.1 Why customize and integrate?The <strong>IBM</strong> <strong>Lotus</strong> Sametime Connect client at this time is not available forcustomization, unless you are privileged to have access to the necessary sourcecode. As you can see from the examples within this chapter and throughout thisredbook however, Sametime is capable of much more than simply sending textinstant messages. In the examples within this chapter, we will show you how tosend data in XML format, which can in turn represent graphic images directlywithin a customized Sametime Java Connect client.Customization allows users and organizations to further leverage the capabilitiesof Sametime beyond its traditional usage as an instant messaging client, or as ane-meeting hosting tool. Fortunately, <strong>Lotus</strong> does provide the Sametime SDK,which contains the different toolkits. This allows for customization and integrationwith other applications on a variety of platforms.12.2 Using Sametime to send dataYou should, by now, be very familiar with Sametime’s ability to send textmessages between clients. This is the foundation for Sametime’s instantmessaging functionality. But the <strong>Instant</strong> <strong>Messaging</strong> Service of the Client Toolkitalso allows binary data to be sent between clients. The <strong>Instant</strong> <strong>Messaging</strong>Service provides the sendData() method to send binary data to another party.The dataReceived() method is called in response by the receiving party.In this section, we describe a Sametime Bot that sends information about acustomer’s orders to a Java applet client. An end user enters a customer ordernumber into the applet. The applet sends the information to the bot using astandard text message. The bot receives the message and looks up the orderdetails. It sends a text message back to the applet, echoing the message itreceived. But it also sends back binary data containing full details about therequested order. The applet receives this data and updates its display so the enduser can see the full order summary.This example is made up of two parts: a RichTextBot Java application and aRichTextClient Java applet. Both are developed using the Java Client Toolkit.12.2.1 The RichTextBot Sametime BotThe RichTextBot is a Java application very similar to the one described in 3.3.1,“The Echo Bot” on page 56. It logs in to the Sametime server and waits to becontacted by the client applet. When it receives a text message from the applet,334 <strong>Lotus</strong> <strong>Instant</strong> <strong>Messaging</strong>/<strong>Web</strong> <strong>Conferencing</strong> (Sametime): Building Sametime-Enabled Applications

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!