JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Base.DelegationEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--javax.telephony.media.provider.EventObject
              |
              +--javax.telephony.media.provider.Base.Event
                    |
                    +--javax.telephony.media.provider.Base.MediaServiceEvent
                          |
                          +--javax.telephony.media.provider.Base.BindAndReleaseEvent
                                |
                                +--javax.telephony.media.provider.Base.DelegationEvent
All Implemented Interfaces:
Async.BindAndReleaseEvent, Async.DelegationEvent, Async.Event, Async.MediaServiceEvent, DelegationConstants, DelegationEvent, Dispatcher.DispatchableEvent, MediaConstants, MediaEvent, MediaServiceConstants, MediaServiceEvent, java.io.Serializable
Enclosing class:
Base

public static class Base.DelegationEvent
extends Base.BindAndReleaseEvent
implements Async.DelegationEvent

Implements DelegationEvent and Async.DelegationEvent

See Also:
Serialized Form

Inner classes inherited from class javax.telephony.media.provider.Base.Event
Base.Event.SyncInterruptedException
 
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
 
Fields inherited from interface javax.telephony.media.DelegationConstants
ev_Delegated, q_Released, q_Removed, q_Retrieved, q_Returned, tag_CatchAll, tag_CatchNone, tag_DestroyRequest, tag_NeverReturn, tag_NormalReturn, tag_RemoveSession, tag_SessionDeath, v_Released
 
Constructor Summary
Base.DelegationEvent(java.lang.Object source, Symbol eventID)
           
 
Method Summary
 void dispatch(java.util.EventListener listener)
          Invoke the appropriate callback method on the appropriate Listener.
 void done(java.lang.Exception exception, MPI.MediaGroup mediaGroup)
          sometimes delegation returns bound, sometimes not.
 Symbol getRetrieveCause()
          Return the cause Symbol of the retrieve() that caused delegateToService() to complete.
 java.lang.String getReturnTag()
          the Tags used in the releaseToTags command.
 boolean reconfigurationFailed()
          Returns true if delegateToService() could not reconfigure the MediaGroup when it was returned.
 
Methods inherited from class javax.telephony.media.provider.Base.BindAndReleaseEvent
throwIfBindException, throwIfConfigException
 
Methods inherited from class javax.telephony.media.provider.Base.MediaServiceEvent
getMediaService
 
Methods inherited from class javax.telephony.media.provider.Base.Event
done, getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning, isDone, setError, setFields, setFields, setPayload, setQualifier, setSubError, throwIfRuntimeException, toString, waitForEventDone, waitForEventDone, waitForListenersDone
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.telephony.media.MediaServiceEvent
getMediaService
 
Methods inherited from interface javax.telephony.media.MediaEvent
getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning
 
Methods inherited from interface javax.telephony.media.async.Async.BindAndReleaseEvent
throwIfBindException, throwIfConfigException
 
Methods inherited from interface javax.telephony.media.async.Async.Event
isDone, throwIfRuntimeException, waitForEventDone, waitForEventDone, waitForListenersDone
 

Constructor Detail

Base.DelegationEvent

public Base.DelegationEvent(java.lang.Object source,
                            Symbol eventID)
Method Detail

done

public void done(java.lang.Exception exception,
                 MPI.MediaGroup mediaGroup)
sometimes delegation returns bound, sometimes not.

dispatch

public void dispatch(java.util.EventListener listener)
Description copied from class: Base.Event
Invoke the appropriate callback method on the appropriate Listener. Each sub-class must define an EventListener and callback method by supplying this method.

Implements Dispatcher.DispatchableEvent

Typically, Async.SomeEvent dispatches to like this:

public void dispatch(EventListener listener) {
if (listener instanceof Async.SomeListener)
((Async.SomeListener)listener).onSomeDone(this);
}

Invoked by Base_MediaService

Overrides:
dispatch in class Base.Event
Following copied from class: javax.telephony.media.provider.Base.Event
Parameters:
listener - an EventListener, some kind of MediaListener.

reconfigurationFailed

public boolean reconfigurationFailed()
Description copied from interface: DelegationEvent
Returns true if delegateToService() could not reconfigure the MediaGroup when it was returned.

Note: the MediaGroup is returned when the new/current owner calls some form of release() or when this MediaService invokes retrieve().

Specified by:
reconfigurationFailed in interface DelegationEvent
Following copied from interface: javax.telephony.media.DelegationEvent
Returns:
true if reconfiguration failed when ownership was returned

getReturnTag

public java.lang.String getReturnTag()
the Tags used in the releaseToTags command. delivered to the recieving MediaService.
Specified by:
getReturnTag in interface DelegationEvent
Following copied from interface: javax.telephony.media.DelegationEvent
Returns:
the returnTag String used in releaseToTag().

getRetrieveCause

public Symbol getRetrieveCause()
Description copied from interface: DelegationEvent
Return the cause Symbol of the retrieve() that caused delegateToService() to complete.

If this MediaService is unbound because the MediaGroup was retrieved by some older owner using retrieve(Symbol cause), then getRetrieveCause() returns the cause Symbol and getQualifier() returns q_Retrieved.

If the MediaService is unbound because the MediaGroup was released to some older owner using releaseToTag, then getRetrieveCause() returns the v_Released getQualifier() returns q_Released, and getReturnTags() returns the tag String used in releaseToTag(). [that is, a tag which was not caught by this MediaService]

Valid when: event.getEventID().equals(ev_DelegateToService) &&
event.getQualifier.equals(q_Retrieved)
or
event.getQualifier.equals(q_Released)

Note: for the non-trans onRetrieved(ev_Retrieved), the retrieve cause is available from MediaServiceEvent.getQualifier().

Specified by:
getRetrieveCause in interface DelegationEvent
Following copied from interface: javax.telephony.media.DelegationEvent
Returns:
the Symbol used when the MediaGroup was retrieved from this MediaService.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org