agent.interaction.samples
Class SimpleChatInteraction

java.lang.Object
  extended by agent.interaction.samples.SimplePlace
      extended by agent.interaction.samples.SimpleChatInteraction
All Implemented Interfaces:
com.genesyslab.ail.event.ConfigObjectListener, com.genesyslab.ail.event.DnListener, com.genesyslab.ail.event.InteractionChatListener, com.genesyslab.ail.event.InteractionListener, com.genesyslab.ail.event.PlaceListener, java.util.EventListener

public class SimpleChatInteraction
extends SimplePlace
implements com.genesyslab.ail.event.InteractionChatListener

Manages a chat session. This example lets you participate in a chat session by managing a chat interaction.

A check box lets you activate CoBrowse. If CoBrowse is active, the example adds URLs posted in a chat message to a CoBrowse interaction.


Field Summary
 boolean sessionDisplayed
           
 
Fields inherited from class agent.interaction.samples.SimplePlace
sampleAgent, sampleChat, sampleDn, sampleEmail, sampleOpenMedia, samplePlace
 
Constructor Summary
SimpleChatInteraction(java.lang.String windowTitle)
           
 
Method Summary
 void checkURLs(java.lang.String text)
           
 void displayInteractionChatMessage(com.genesyslab.ail.ChatParty party, java.lang.String message)
           
 void handleInteractionChatEvent(com.genesyslab.ail.event.InteractionChatEvent chatEvent)
           
 void handleInteractionEvent(com.genesyslab.ail.event.InteractionEvent event)
          This method is required by the PlaceListener interface, but is not used by the SimplePlace example because this example doesn't generate any interactions.
 void linkWidgetsToGui()
          Links widgets (user interface components) to API functionality and registers a listener for events on the Place the agent has logged in to.
static void main(java.lang.String[] args)
           
 void setInteractionWidgetState()
          The setInteractionWidgetState() method is used by subclasses of the SimplePlace class.
 void setPlaceWidgetState()
          Any time the place associated with this example changes its state, the example's widgets must be updated to reflect that state.
 void setSampleType()
          Tells the AgentInteractionGui class which example has called the GUI, so that it can determine which widgets will be enabled when the GUI is created.
 
Methods inherited from class agent.interaction.samples.SimplePlace
contactChanged, deleted, dnAdded, dnRemoved, handleDnEvent, handlePlaceEvent, idModified
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sessionDisplayed

public boolean sessionDisplayed
Constructor Detail

SimpleChatInteraction

public SimpleChatInteraction(java.lang.String windowTitle)
Parameters:
windowTitle -
Method Detail

main

public static void main(java.lang.String[] args)

setSampleType

public void setSampleType()
Tells the AgentInteractionGui class which example has called the GUI, so that it can determine which widgets will be enabled when the GUI is created.


linkWidgetsToGui

public void linkWidgetsToGui()
Links widgets (user interface components) to API functionality and registers a listener for events on the Place the agent has logged in to.

The linked widgets for Simple Email are buttons for processing an inbound email and the reply to this email. These buttons correspond to the following actions:

Overrides:
linkWidgetsToGui in class SimplePlace
See Also:
SimplePlace.linkWidgetsToGui()

setPlaceWidgetState

public void setPlaceWidgetState()
Description copied from class: SimplePlace
Any time the place associated with this example changes its state, the example's widgets must be updated to reflect that state. For example, if the "Log In" button has been clicked and the login was successful, the "Log In" button must now be disabled and the "Log Out" button must be enabled.

This method enables or disables the specified widgets, which are normally just buttons and radio buttons, but may include other widgets. To do this, it uses the isPossible method of the Possible interface.

The isPossible method returns either true or false, depending on whether a particular action is possible. This boolean value is used to determine whether the widget will be enabled.

Overrides:
setPlaceWidgetState in class SimplePlace

setInteractionWidgetState

public void setInteractionWidgetState()
Description copied from class: SimplePlace
The setInteractionWidgetState() method is used by subclasses of the SimplePlace class. These classes have widgets whose state must be set when they receive InteractionEvents.

Since SimplePlace itself does not receive InteractionEvents, the method body has been left empty here.

Overrides:
setInteractionWidgetState in class SimplePlace

displayInteractionChatMessage

public void displayInteractionChatMessage(com.genesyslab.ail.ChatParty party,
                                          java.lang.String message)

checkURLs

public void checkURLs(java.lang.String text)

handleInteractionEvent

public void handleInteractionEvent(com.genesyslab.ail.event.InteractionEvent event)
Description copied from class: SimplePlace
This method is required by the PlaceListener interface, but is not used by the SimplePlace example because this example doesn't generate any interactions. However, this method is implemented by the examples that use interactions, such as SimpleVoiceInteraction and SimpleEmailInteraction.

Specified by:
handleInteractionEvent in interface com.genesyslab.ail.event.InteractionListener
Overrides:
handleInteractionEvent in class SimplePlace

handleInteractionChatEvent

public void handleInteractionChatEvent(com.genesyslab.ail.event.InteractionChatEvent chatEvent)
Specified by:
handleInteractionChatEvent in interface com.genesyslab.ail.event.InteractionChatListener