JSR-043: JTAPI-1.4

javax.telephony.media.async
Interface Async.MediaGroupListener

All Superinterfaces:
java.util.EventListener, MediaListener
Enclosing class:
Async

public static interface Async.MediaGroupListener
extends MediaListener

Listener for MediaGroup method transaction completion events. Completion callbacks for async_configure(), async_getTerminal(), async_setParameters(), etc.

Note: These callbacks are also invoked when the synchronous versions of the MediaService methods complete.

Note:Bind and Release completions do not come here. Those are delivered to the Async.BindAndReleaseListener.


Method Summary
 void onMediaGroupDone(MediaGroupEvent event)
          Universal callback for MediaGroup method completion events.
 

Method Detail

onMediaGroupDone

public void onMediaGroupDone(MediaGroupEvent event)
Universal callback for MediaGroup method completion events. The eventID indicates which method has completed. To extract event-specific values, just check getEventID() and then extract the appropriate field.

The eventID name is "ev_MethodName" except for method MediaService.stop(); for this method, the event is named "ev_GroupStop" to avoid conflict with the Resource events' "ev_Stop"

For example, to get the terminal name String when getTerminalName() completes, use:

     if (event.getEventID().equals(ev_GetTerminalName)) 
        String name = event.getTerminalName();

Note: at this time there is no justification to define additional callback methods specialized for each MediaGroup method.

If an application developer is using these extensively, it is fairly easy to define an adapter class that dispatches to application defined methods such as:
void onGetTerminalDone(MediaGroupEvent event);
void onGetTermNameDone(MediaGroupEvent event);
void onGetConfigDone(MediaGroupEvent event);
void onGetDictDone(MediaGroupEvent event);

Parameters:
event - a MediaGroupEvent that is done.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org