JSR-043: JTAPI-1.4

javax.telephony.media
Interface MediaEvent

All Superinterfaces:
MediaConstants, MediaServiceConstants
All Known Subinterfaces:
ASREvent, Async_ASREvent, Async_ContainerEvent, Async_DataObjectEvent, Async_MediaConnectionEvent, Async_PlayerEvent, Async_RecorderEvent, Async_ServiceEvent, Async_SignalDetectorEvent, Async_SignalGeneratorEvent, Async.BindAndReleaseEvent, Async.BindEvent, Async.BindToCallEvent, Async.DelegationEvent, Async.Event, Async.MediaGroupEvent, Async.MediaServiceEvent, Async.ReleaseEvent, Async.ResourceEvent, ContainerEvent, DataObjectEvent, DelegationEvent, MediaConnectionEvent, MediaGroupEvent, MediaServiceEvent, PlayerEvent, RecorderEvent, ResourceEvent, ServiceEvent, ServiceRequestEvent, SignalDetectorEvent, SignalGeneratorEvent

public interface MediaEvent
extends MediaServiceConstants

Base interface for all Events in the media pacakge. Indicates the completion of some media package operation. Characterized by an EventID representing the event identity.

This interface defines a set of accessors common to all media events. The accessors may return null if the value is not relevant for the particular event being queried.

Note: Classes that implement this interface shall follow the standard Java Listener design pattern by extending java.util.EventObject.

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
 Symbol getError()
          Return a Symbol describing the error.
 Symbol getEventID()
          Get the Symbol that identifies this event.
 java.lang.Exception getException()
          Return the Exception associated with this event.
 java.util.Dictionary getPayload()
          Implementation-specific additional event information.
 Symbol getQualifier()
          Return the qualifier value for this event.
 int getSubError()
          Return the int suberror field for this event.
 Symbol getWarning()
          Return a Symbol describing the warning.
 

Method Detail

getEventID

public Symbol getEventID()
Get the Symbol that identifies this event.

For completion events, this identifies the operation that has completed. For synchronous code this is mostly redundant, but it may be useful for asynchronous Listeners. Further detail about how/why the operation completed is available using getQualifier().

The Symbols returned from by this method have names of the form: ev_Operation.

Returns:
the Symbol that identifies this event
See Also:
ResourceEvent

getQualifier

public Symbol getQualifier()
Return the qualifier value for this event. Qualifiers supply additional information about how or why the operation completed.

Standard return values are one of:
q_Standard, q_Duration, q_RTC, q_Stop
which indicate the reason or mode of completion. Other qualifiers may be documented in the resource event classes.

If the associated method or transaction did not succeed, this methods returns null; use getError() to determine the cause of failure.

Returns:
a Symbol that indicates the completion cause (q_Something).

getWarning

public Symbol getWarning()
Return a Symbol describing the warning. Return value is non-null if operation completed, but in some unusual or boundary condition.
Returns:
a Symbol that identifies the warning.

getError

public Symbol getError()
Return a Symbol describing the error. If there was no error, returns ErrSym.e_OK.
Returns:
a Symbol that identifies the error.

getSubError

public int getSubError()
Return the int suberror field for this event. SubError values are defined for some errors and supply additional information about the error.
Returns:
the int suberror

getPayload

public java.util.Dictionary getPayload()
Implementation-specific additional event information. For example, this may contain the ECTF S.200 payload Dictionary associated with this event.
Returns:
a Dictionary of event information.

getException

public java.lang.Exception getException()
Return the Exception associated with this event.

If the operation terminated with any kind of exception, return that Exception. If the operation completed with statusOK, then return null.

The Exception returned will be one of the Exceptions declared in the synchronous interface for the request method, or any undeclared RuntimeException.

Note: the stacktrace in the Exception may not be useful. The stacktrace may be of the original creator of the Exception (which could be in some other implementation Thread) or may be from the last call to throwIfSomeException().

Returns:
any Exception generated by the transaction.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org