JSR-043: JTAPI-1.4

javax.telephony.media
Interface MediaServiceListener

All Superinterfaces:
java.util.EventListener, MediaConstants, MediaListener, MediaServiceConstants

public interface MediaServiceListener
extends MediaListener, MediaServiceConstants

Listener for non-transactional events generated by a MediaService.

Since:
JTAPI-1.3

Fields inherited from interface javax.telephony.media.MediaServiceConstants
ev_BindAndConnect, ev_BindToCall, ev_BindToServiceName, ev_BindToTerminal, ev_BindToTerminalName, ev_Configure, ev_Connected, ev_DelegateToService, ev_Disconnected, ev_GetConfigSpec, ev_GetConfiguration, ev_GetParameters, ev_GetTerminal, ev_GetTerminalName, ev_GetUserValues, ev_GroupStop, ev_Release, ev_ReleaseDelegated, ev_ReleaseToDestroy, ev_ReleaseToService, ev_ReleaseToTag, ev_Retrieve, ev_Retrieved, ev_SetParameters, ev_SetUserDictionary, ev_SetUserValues, ev_TerminalIdle, ev_TriggerRTC
 
Fields inherited from interface javax.telephony.media.MediaConstants
e_OK, q_Duration, q_Standard, q_Stop
 
Method Summary
 void onConnected(MediaServiceEvent event)
          Invoked when the [JTAPI] Connection to a MediaService is CONNECTED.
 void onDisconnected(MediaServiceEvent event)
          A [JTAPI] Connection to the MediaService has been disconnected.
 void onRetrieved(MediaServiceEvent event)
          A previous owner has retrieved the MediaGroup of this MediaService.
 

Method Detail

onDisconnected

public void onDisconnected(MediaServiceEvent event)
A [JTAPI] Connection to the MediaService has been disconnected. This method is invoked when the Connection to the bound Terminal transitions to the state Connection.DISCONNECTED.

Related processing:

If event.getEventID().equals(ev_Disconnected, and (a_StopOnDisconnect == TRUE) then all resource transactions have been terminated.

If event.getEventID().equals(ev_TerminalIdle), then there are no more Connections to the Terminal, and all resource transactions have been terminated.

Corresponds to CCR_ECTF_State = CCR_ECTF_Idle, in S.100. ?

Parameters:
event - a MediaServiceEvent with EventID: ev_Disconnected or ev_TerminalIdle

onConnected

public void onConnected(MediaServiceEvent event)
Invoked when the [JTAPI] Connection to a MediaService is CONNECTED. Corresponds to CCR_ECTF_State = CCR_ECTF_Active, in S.100.

The Connection to the MediaService is now CONNECTED, the media stream is active and available.

Parameters:
event - a MediaServiceEvent with EventID: ev_Connected
Since:
1.4

onRetrieved

public void onRetrieved(MediaServiceEvent event)
A previous owner has retrieved the MediaGroup of this MediaService. This MediaService is now unbound.

event.getEventID().equals(ev_Retrieved)
event.getQualifier().equals(retrieval cause Symbol)

Note: onRetrieved() may be invoked even if this application is not using delegation! Any application that uses bindToServiceName() may receive a MediaGroup from an application that will later decide to retrieve it.

Note: if the MediaGroup is retrieved while this MediaService has delegated the MediaGroup, then delegateToService will complete with getQualifier().equals(ev_Retrieved) and the cause Symbol is available using event.getRetrieveCause().

Note: parameter is a simple MediaServiceEvent!
The only relevant info is the retrieveCause; and that goes in the qualifier.

Parameters:
event - a MediaServiceEvent with EventID: ev_Retrieved
Since:
1.4
See Also:
Delegation.retrieve(javax.telephony.media.Symbol)

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org