com.genesyslab.ail
Interface CallbackService


public interface CallbackService

Provides the callback service.

The CallbackService interface represents the extra features for handling Voice Callback requests of a particular agent or place.

To get an instance of the CallbackService interface, call the Agent.getCallbackService() or Place.getCallbackService() method, as shown in the following code snippet.
CallbackService myCallbackService = myPlaceExample.getCallbackService();

Use the CallbackService interface to get the callback record associated with an interaction. For example, do this when your application receives an InteractionEvent event on a Place for a new voice interaction, as shown in the following code snippet:

public class SimpleCallback implements PlaceListener {
    public void handleInteractionEvent(InteractionEvent event)
    {
        Interaction interaction = event.getInteraction();
        // Testing whether it is a new voice interaction
        //...
        
        //Getting the associated callback record (if any)
        CallbackRecord callbackRecord = myCallbackService.getCallbackRecord(interaction);
        
        //...
    }
}

See Also:
CallbackRecord, AgentListener, PlaceListener, InteractionEvent

Method Summary
 CallbackRecord getCallbackRecord(Interaction interaction)
          Returns the Callback record associated with this interaction if it has extended capabilities.
 CallbackRecord getCallbackRecord(java.lang.String id)
          Returns the callback record corresponding with this ID.
 boolean isAvailable()
          Deprecated.  
 

Method Detail

isAvailable

boolean isAvailable()
Deprecated. 


getCallbackRecord

CallbackRecord getCallbackRecord(Interaction interaction)
Returns the Callback record associated with this interaction if it has extended capabilities.
This method lets you determine if this interaction has a callback record associated with it.

Returns:
a callback record if it has extended capabilities; otherwise null.

getCallbackRecord

CallbackRecord getCallbackRecord(java.lang.String id)
Returns the callback record corresponding with this ID.

Parameters:
id - a callback record ID.
Returns:
a callback record if the ID is found, otherwise null.