Appendix B. Online customer support application example 463
Similar to the customer chat window, we use the ChatArea class to display the
chat transcript and standard AWT components for the input field and buttons.
The Send button performs the same function, sending a line of text to the
customer. The Send Page button brings up a dialog box with a predefined list of
URLs to send the customer. The Hang Up button terminates the chat, and the
Select All and Copy buttons allow the agent to easily copy the contents of the
chat transcript to the clipboard.
Agent attributes
The agent applet sets the attributes shown in Table B-2.
Table B-2 Agent applet attributes
Agent state machine
The agent applet has three states, as shown in Figure B-8 on page 464.
Attribute constant ID Type Description
STATE 1 INT Applet state
2=responding to
chat, and
NAME 2 STRING Agent name
current customer
COMPANY 4 STRING Company name of
the current

Get Lotus Instant Messaging/Web Conferencing (Sametime): Building Sametime Enabled Applications now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.