|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InteractionChat
A chat interaction with a customer.
This interface enables participation in a chat session. It provides the following actions:
To get instances of this interface, your application listens for an
InteractionEvent, which indicates ringing chat interactions.
To receive InteractionEvent events for ringing chat interactions, use a PlaceListener
(or an AgentListener) added to a Place (or Agent) object that includes the chat media.
For each new chat session, your application receives an InteractionEvent for a chat interaction
that has an Interaction.Status.RINGING status.
To determine which actions are available at a certain time, test the corresponding
InteractionChat.Action value by calling the isPossible method.
For example, use the possible actions to activate or deactivate buttons that make calls
to the corresponding InteractionChat methods.
To enter the chat session, call the answerCall method. By default,
the nickname is the agent name, and the party type is ChatParty.Type.AGENT.
To have other values for nickname and party type, set new values before calling the answerCall method.
If the InteractionChat object is in Interaction.Status.TALKING
status, your application can chat with parties. To send a message, call the sendMessage(java.lang.String) method.
Actions on the chat interaction generate events that your application can use to refresh:
InteractionEvent for interaction status and data changes.
InteractionChatEvent for getting new messages, and
changes in parties, during the chat session.To get the InteractionChatEvent events of an InteractionChat object,
implement and add an InteractionChatListener to the InteractionChat
interaction, as shown in the following code snippet.
public class SimpleChatExample implements InteractionChatListener
{
public SimpleChatExample(InteractionChat exampleInteractionChat)
{
//Adding the listener
exampleInteractionChat.addChatListener(this);
}
public void handleInteractionChatEvent(InteractionChatEvent event)
{
//Implement this method to refresh your application
//with the new chat information about:
//-New messages
//-Parties.
}
}
To disconnect the chat session, invoke the releaseCall
method. After receiving the InteractionEvent for Interaction.Status.IDLE, use the
markDone method to properly save and clean the interaction.
Note: The e-mail server can employ a routing strategy to send the transcript of the chat
interaction to the contact. In this case, to disconnect, use clearCall(boolean)
(or transferQueue)
instead of releaseCall. The transcript is automatically sent to the contact.
| Nested Class Summary | |
|---|---|
static class |
InteractionChat.Action
Interaction chat actions. |
| Nested classes/interfaces inherited from interface com.genesyslab.ail.InteractionMultimedia |
|---|
InteractionMultimedia.StopProcessingReason |
| Nested classes/interfaces inherited from interface com.genesyslab.ail.Interaction |
|---|
Interaction.Status, Interaction.Type |
| Nested classes/interfaces inherited from interface com.genesyslab.ail.AbstractInteraction |
|---|
AbstractInteraction.AbstractCallType |
| Method Summary | |
|---|---|
InteractionChatEvent[] |
addChatListener(InteractionChatListener _listener,
boolean getPreviousEvents)
Registers a listener for the events on this InteractionChat. |
void |
clearCall(boolean bForceClose)
Disconnects from the Chat Server in after_action mode "ForceClose" or "CloseIfNoAgents". |
void |
conferenceAgent(java.lang.String invitedAgentId,
ChatParty.Visibility visibility,
java.lang.String reason)
Requests an agent or supervisor to join chat. |
void |
conferencePlace(java.lang.String placeId,
ChatParty.Visibility visibility,
java.lang.String reason)
Requests a place to join chat . |
java.lang.String |
getCobrowseIdParty()
Returns the ID of the CoBrowse party; or null if there is
no CoBrowse party. |
long |
getDuration()
Returns the duration of this chat session in seconds. |
InteractionChatEvent[] |
getEvents()
Returns the events received from the beginning of the chat session or null if no message. |
ChatMessage[] |
getMessages()
Returns all the messages exchanged from the beginning of the session or null if no message. |
java.lang.String |
getNickName()
Returns either the nickname if exists or the user name. |
ChatParty[] |
getParties()
Returns all the known chat parties of this interaction. |
ChatParty.Type |
getPartyType()
Returns the party type. |
ChatParty.Visibility |
getVisibility()
Returns the visibility. |
boolean |
isOnLine()
Returns true if the interaction has a corresponding session in the Chat Server. |
void |
pushURL(java.lang.String url)
Pushes this URL onto the other parties' desktops. |
void |
removeAllChatListeners()
Removes all the listeners for the events on this InteractionChat. |
void |
removeChatListener(InteractionChatListener _listener)
Removes a listener for the events on this InteractionChat. |
void |
sendMessage(java.lang.String message)
Sends a message to all the chat parties. |
void |
setNickName(java.lang.String nickName,
ChatParty.Type type)
Sets the nickname before the answerCall. |
void |
setPartyType(ChatParty.Type partyType)
Sets the party type of this agent on this chat interaction. |
void |
setVisibility(ChatParty.Visibility visibility)
Sets the visibility: before answerCall to specify the join mode or after answerCall to change visibility |
void |
typingStarted()
Notifies the other parties that this agent is typing some text. |
void |
typingStopped()
Notifies the other parties that this agent is no longer typing. |
| Methods inherited from interface com.genesyslab.ail.Interaction |
|---|
answerCall, countOtherPendingInteractions, getContactId, getContentBinary, getContentBinaryMimeType, getContentBinarySize, getDateCreated, getDn, getEndDate, getMedia, getNotepad, getParentInteraction, getPlace, getStatus, getStructTextMimeType, getStructuredText, getSubject, getText, getType, getUserName, isDone, markDone, merge, releaseCall, save, setContactId, setContentBinary, setContentBinaryMimeType, setContentBinarySize, setNotepad, setStructTextMimeType, setStructuredText, setSubject, setText |
| Methods inherited from interface com.genesyslab.ail.AbstractInteraction |
|---|
addInteractionListener, getAttachedData, getAttachedData, getAttachedDataEx, getTConnectionId, queryStatus, removeAttachedData, removeInteractionListener, saveAttachedData, setAttachedData |
| Methods inherited from interface com.genesyslab.ail.Possible |
|---|
arePossible, isPossible |
| Methods inherited from interface com.genesyslab.ail.Savable |
|---|
getContactServerId, isDirty |
| Method Detail |
|---|
InteractionChatEvent[] addChatListener(InteractionChatListener _listener,
boolean getPreviousEvents)
InteractionChat.
_listener - InteractionChatListener.getPreviousEvents - true to return an array of the InteractionChatEvent received until now.
void removeChatListener(InteractionChatListener _listener)
InteractionChat.
_listener - InteractionChatListener: the listener to remove.void removeAllChatListeners()
InteractionChat.
void setNickName(java.lang.String nickName,
ChatParty.Type type)
throws RequestFailedException
nickName - the nickname.type - the party type.
RequestFailedExceptionjava.lang.String getNickName()
ChatParty.Type getPartyType()
void setPartyType(ChatParty.Type partyType)
void setVisibility(ChatParty.Visibility visibility)
throws RequestFailedException
visibility - the visibility (ALL, INT, VIP).
RequestFailedExceptionChatParty.Visibility getVisibility()
void conferenceAgent(java.lang.String invitedAgentId,
ChatParty.Visibility visibility,
java.lang.String reason)
throws RequestFailedException
InteractionEvent containing error description in extensions.InteractionEvent containing in extensions:ChatParty.Visibility
invitedAgentId - the agent ID.reason - the reason of the conference.visibility - the visibility (ALL, INT, VIP).
RequestFailedException
void conferencePlace(java.lang.String placeId,
ChatParty.Visibility visibility,
java.lang.String reason)
throws RequestFailedException
InteractionEvent will be sent containing error description in extensions.InteractionEvent containing in extensions:ChatParty.Visibility
placeId - the place ID.reason - the reason of the conference.visibility - the visibility.
RequestFailedException
void clearCall(boolean bForceClose)
throws RequestFailedException
bForceClose - if true after_action = ForceClose, otherwise after_action = CloseIfNoAgents.
RequestFailedExceptionboolean isOnLine()
void sendMessage(java.lang.String message)
throws RequestFailedException
message - the message to be sent to all the parties depending on the visibility.
RequestFailedExceptionChatParty[] getParties()
ChatParty.ChatMessage[] getMessages()
ChatMessage.InteractionChatEvent[] getEvents()
InteractionChatEvent.long getDuration()
long.java.lang.String getCobrowseIdParty()
null if there is
no CoBrowse party.
void pushURL(java.lang.String url)
throws RequestFailedException
RequestFailedException
void typingStarted()
throws RequestFailedException
RequestFailedException
void typingStopped()
throws RequestFailedException
RequestFailedException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||