JSR-043: JTAPI-1.4

javax.telephony.media.provider
Interface MPI.GroupProvider

All Superinterfaces:
MediaProvider
All Known Implementing Classes:
NullGroupProvider
Enclosing class:
MPI

public static interface MPI.GroupProvider
extends MediaProvider

The MPI definition of a GroupProvider. These methods are invoked in Base_MediaService.

The methods are of the form:
Base.Event methodName(Base.Event, arglist);

The semantics of these methods are defined by the corresponding methods in MediaService and Async.MediaService.

The first (event) argument contains the MediaService source and the correct eventID. Typically, the implementation should use, return and done-ify the event as supplied.

The provider implementation may create and return its own specialized version of the event, but there are restrictions:

  1. The new event must have the same source and eventID
  2. Only the original event can effect the binding state. To complete the bind or release operation, the original event must be done-ified with the new MediaGroup binding. That is, the provider may return its own event for the applications use, but the original event must be kept and used to drive the MPI framework. When the operation is complete, both events must contain the correct information and both must be done-ified.

Note: these methods return a Base.Event instead of Async.Event because Base.Event includes a package accessor method to extract the MediaGroup from the event. [It is difficult to hide this accessor if it must be a public interface with a public method.]

Note: The declaration of MPI.GroupProvider ensures that a MPI.GroupProvider isa MediaProvider. However, the MPI framework (Base_MediaService) also assumes that the object that implements MediaProvider, and is used in
new BasicMediaService(MediaProvider)
implements the more specialized MPI.GroupProvider. This removes the necessity of declaring a public accessor in javax.telephony.media.MediaProvider, such as:
MPI.GroupProvider getGroupProvider() which would require a reference from the media package to the provider package which we want to avoid.

If a MediaProvider implementation is outside the MPI framework, then it may/must modify (or discard) Base_MediaService accordingly.


Method Summary
 Base.BindToCallEvent bindAndConnect(Base.BindToCallEvent event, ConfigSpec cs, java.lang.String s1, java.lang.String s2)
           
 Base.BindToCallEvent bindToCall(Base.BindToCallEvent event, ConfigSpec cs, Call call)
           
 Base.BindEvent bindToServiceName(Base.BindEvent event, ConfigSpec cs, java.lang.String serviceName)
           
 Base.BindEvent bindToTerminal(Base.BindEvent event, ConfigSpec cs, Terminal t1)
           
 Base.BindEvent bindToTerminalName(Base.BindEvent event, ConfigSpec cs, java.lang.String s1)
           
 Base.Event cancelBindRequest(Base.Event event, Base.Event target)
          Cancel any ongoing Bind or Release.
 Base.DelegationEvent delegateToService(Base.DelegationEvent event, MPI.MediaGroup group, java.lang.String serviceName, int timeout, java.lang.String catchTags)
           
 Base.ReleaseEvent release(Base.ReleaseEvent event, MPI.MediaGroup group)
           
 Base.DelegationEvent releaseDelegated(Base.DelegationEvent event, MPI.MediaGroup group)
           
 Base.ReleaseEvent releaseToDestroy(Base.ReleaseEvent event, MPI.MediaGroup group)
           
 Base.ReleaseEvent releaseToService(Base.ReleaseEvent event, MPI.MediaGroup group, java.lang.String serviceName, int timeout)
           
 Base.ReleaseEvent releaseToTag(Base.ReleaseEvent event, MPI.MediaGroup group, java.lang.String returnTag)
           
 Base.DelegationEvent retrieve(Base.DelegationEvent event, MPI.MediaGroup group, Symbol cause)
           
 
Methods inherited from interface javax.telephony.media.MediaProvider
getMediaService
 

Method Detail

bindAndConnect

public Base.BindToCallEvent bindAndConnect(Base.BindToCallEvent event,
                                           ConfigSpec cs,
                                           java.lang.String s1,
                                           java.lang.String s2)

bindToCall

public Base.BindToCallEvent bindToCall(Base.BindToCallEvent event,
                                       ConfigSpec cs,
                                       Call call)

bindToTerminalName

public Base.BindEvent bindToTerminalName(Base.BindEvent event,
                                         ConfigSpec cs,
                                         java.lang.String s1)

bindToTerminal

public Base.BindEvent bindToTerminal(Base.BindEvent event,
                                     ConfigSpec cs,
                                     Terminal t1)

bindToServiceName

public Base.BindEvent bindToServiceName(Base.BindEvent event,
                                        ConfigSpec cs,
                                        java.lang.String serviceName)

delegateToService

public Base.DelegationEvent delegateToService(Base.DelegationEvent event,
                                              MPI.MediaGroup group,
                                              java.lang.String serviceName,
                                              int timeout,
                                              java.lang.String catchTags)

retrieve

public Base.DelegationEvent retrieve(Base.DelegationEvent event,
                                     MPI.MediaGroup group,
                                     Symbol cause)

releaseDelegated

public Base.DelegationEvent releaseDelegated(Base.DelegationEvent event,
                                             MPI.MediaGroup group)

release

public Base.ReleaseEvent release(Base.ReleaseEvent event,
                                 MPI.MediaGroup group)

releaseToTag

public Base.ReleaseEvent releaseToTag(Base.ReleaseEvent event,
                                      MPI.MediaGroup group,
                                      java.lang.String returnTag)

releaseToDestroy

public Base.ReleaseEvent releaseToDestroy(Base.ReleaseEvent event,
                                          MPI.MediaGroup group)

releaseToService

public Base.ReleaseEvent releaseToService(Base.ReleaseEvent event,
                                          MPI.MediaGroup group,
                                          java.lang.String serviceName,
                                          int timeout)

cancelBindRequest

public Base.Event cancelBindRequest(Base.Event event,
                                    Base.Event target)
Cancel any ongoing Bind or Release.
Parameters:
event - a Base.Event which has no particular EventID or callback. but those who care can waitForEventDone().
target - a Base.BindEvent or Base.ReleaseEvent depending on which operation is being cancelled

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org