com.genesyslab.ail
Interface AbstractInteraction

All Superinterfaces:
IdObject, Possible
All Known Subinterfaces:
Interaction, InteractionCallbackRequest, InteractionChat, InteractionCoBrowse, InteractionInvitationIn, InteractionInvitationOut, InteractionInvitationParentIn, InteractionMail, InteractionMailIn, InteractionMailOut, InteractionMultimedia, InteractionOpenMedia, InteractionReplyOut, InteractionVoice, InteractionVoiceCallback, InteractionVoiceOutbound, InteractionWebcallback, RoutingInteraction

public interface AbstractInteraction
extends IdObject, Possible

The base of all interactions, including agent and routing interactions.


Nested Class Summary
static class AbstractInteraction.AbstractCallType
          Constants describing the different types of phone call.
static class AbstractInteraction.Status
          Constants for interaction statuses, common to all media.
 
Method Summary
 void addInteractionListener(java.lang.Object listener)
          Registers a listener for the events on this Interaction.
 java.util.Map getAttachedData()
          Returns the data attached to this interaction.
 java.lang.String getAttachedData(java.lang.String key)
          Returns the String value associated with this key among the attached data of this AbstractInteraction.
 java.lang.Object getAttachedDataEx(java.lang.String key)
          Returns the Object value associated with this key among the attached data of this AbstractInteraction.
 java.lang.String getTConnectionId()
          Returns the TConnectionId of this interaction as a String.
 void queryStatus()
          Deprecated.  
 void removeAttachedData(java.lang.String key)
          Removes an attached key-value pair.
 void removeInteractionListener(java.lang.Object listener)
          Unregisters a listener for the events on this Interaction.
 void saveAttachedData()
          Saves the modifications of the attached data.
 void setAttachedData(java.util.Map data)
          Sets all the attached data at once.
 void setAttachedData(java.lang.String key, java.lang.Object value)
          Sets an attached key-value pair.
 
Methods inherited from interface com.genesyslab.ail.Possible
arePossible, isPossible
 

Method Detail

getTConnectionId

java.lang.String getTConnectionId()
Returns the TConnectionId of this interaction as a String. This identifier is an internal T-Server data, consider this as an advanced feature and rather use getId()

Returns:
the TServer internal connection id

addInteractionListener

void addInteractionListener(java.lang.Object listener)
Registers a listener for the events on this Interaction.

Parameters:
listener - the listener to register.

removeInteractionListener

void removeInteractionListener(java.lang.Object listener)
Unregisters a listener for the events on this Interaction.

Parameters:
listener - the listener to unregister.

getAttachedData

java.util.Map getAttachedData()
Returns the data attached to this interaction.

Returns:
a Map of (String, Object). See setAttachedData(String, Object) to determine the different types of objects that you may inspect in this Map.

getAttachedData

java.lang.String getAttachedData(java.lang.String key)
Returns the String value associated with this key among the attached data of this AbstractInteraction.

Parameters:
key - the key to look for in the attached data.
Returns:
null if this key was not found or if this key does not correspond to a String value.

getAttachedDataEx

java.lang.Object getAttachedDataEx(java.lang.String key)
Returns the Object value associated with this key among the attached data of this AbstractInteraction.

Parameters:
key - the key to look for in the attached data.
Returns:
one of the following:
  • String,
  • Integer,
  • List of byte, or byte[],
  • List, containing those type of objects,
  • Map, recursively containing the same types of pairs.
  • null if this key was not found.

setAttachedData

void setAttachedData(java.lang.String key,
                     java.lang.Object value)
Sets an attached key-value pair. Use saveAttachedData() to apply this modification.

Parameters:
key - The key of the pair.
value - The value of the pair. Valid objects are:
  • a String,
  • an Integer,
  • a List of Byte, or a byte[],
  • a List, containing those types of objects,
  • a Map, recursively containing the same types of pairs.
See Also:
for specific behaviour., for specific behaviour.

setAttachedData

void setAttachedData(java.util.Map data)
                     throws RequestFailedException
Sets all the attached data at once. Previous values are removed if they are not present in the map. The modification is committed into the database, you don't need to call saveAttachedData().

Parameters:
data - the new attached data map for this interaction.
Throws:
RequestFailedException

removeAttachedData

void removeAttachedData(java.lang.String key)
Removes an attached key-value pair. Use saveAttachedData() to apply this modification.


saveAttachedData

void saveAttachedData()
                      throws RequestFailedException
Saves the modifications of the attached data.

Throws:
RequestFailedException

queryStatus

void queryStatus()
                 throws RequestFailedException
Deprecated. 

Asks the servers the actual state of this AbstractInteraction. All registered InteractionListeners will receive a notification of the current status.

Throws:
RequestFailedException