JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Base_MediaConnectionEvent

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.MediaGroupEvent
                                |
                                +--javax.telephony.media.provider.Base_MediaConnectionEvent
All Implemented Interfaces:
Async_MediaConnectionEvent, Async.Event, Async.MediaGroupEvent, Async.MediaServiceEvent, Dispatcher.DispatchableEvent, MediaConnection.Token, MediaConnectionConstants, MediaConnectionEvent, MediaConstants, MediaEvent, MediaGroupEvent, MediaServiceConstants, MediaServiceEvent, java.io.Serializable

public class Base_MediaConnectionEvent
extends Base.MediaGroupEvent
implements Async_MediaConnectionEvent

Minimal or reference implementation of MediaConnectionEvent.

Since:
JTAPI-1.4
See Also:
Serialized Form

Inner Class Summary
static class Base_MediaConnectionEvent.Token
          A minimal structure to implement a MediaConnection.Token.
 
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.connection.MediaConnectionConstants
ev_Bridge, ev_Connect, ev_Disconnect, ev_Join, ev_Loopback, ev_SetDataFlow, v_AllConnections, v_AllSecondary, v_Both, v_Bridge, v_Join, v_Listen, v_Loopback, v_None, v_Primary, v_PrimaryToPrimary, v_PrimaryToSecondary, v_SecondaryToSecondary, v_Talk
 
Constructor Summary
Base_MediaConnectionEvent(java.lang.Object source)
          Do not use, specify the real eventID; from the Token.type.
Base_MediaConnectionEvent(java.lang.Object source, Symbol eventID)
           
Base_MediaConnectionEvent(java.lang.Object source, Symbol eventID, boolean isNonTrans)
          this constructor for a non-Trans version of MediaConnectionEvent.
 
Method Summary
 void dispatch(java.util.EventListener listener)
          dispatch to MediaConnectionListener.
 void done(java.lang.Exception exception, MediaConnection.Token token)
           
 Symbol getDataFlow()
          Return the DataFLow Symbol for this connection.
 Symbol getMaxDataFlow()
          Return the MaxDataFLow Symbol for this connection.
 MediaConnection.Token getToken()
          sub-classes may override to make specialized token.
 Symbol getType()
          Indicate the type of connection.
 void throwIfConnectionException()
           
 
Methods inherited from class javax.telephony.media.provider.Base.MediaGroupEvent
done, getConfigSpec, getDictionary, getTerminal, getTerminalName, 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.async.Async.Event
isDone, throwIfRuntimeException, waitForEventDone, waitForEventDone, waitForListenersDone
 
Methods inherited from interface javax.telephony.media.MediaEvent
getError, getEventID, getException, getPayload, getQualifier, getSubError, getWarning
 
Methods inherited from interface javax.telephony.media.connection.MediaConnection.Token
equals
 
Methods inherited from interface javax.telephony.media.MediaServiceEvent
getMediaService
 

Constructor Detail

Base_MediaConnectionEvent

public Base_MediaConnectionEvent(java.lang.Object source,
                                 Symbol eventID,
                                 boolean isNonTrans)
this constructor for a non-Trans version of MediaConnectionEvent.

Note: Surely, we could use a subclass, but for now, we just set a flag.


Base_MediaConnectionEvent

public Base_MediaConnectionEvent(java.lang.Object source,
                                 Symbol eventID)

Base_MediaConnectionEvent

public Base_MediaConnectionEvent(java.lang.Object source)
Do not use, specify the real eventID; from the Token.type.
Method Detail

dispatch

public void dispatch(java.util.EventListener listener)
dispatch to MediaConnectionListener. either onConnection(event) or onDisconnection(event)

the eventID is set to the more specific connection type.

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

getType

public Symbol getType()
Description copied from interface: MediaConnection.Token
Indicate the type of connection.

Note: For disconnect events, Loopback and Bridge may be concealed as Primary and Secondary, respectively.

Specified by:
getType in interface MediaConnection.Token
Following copied from interface: javax.telephony.media.connection.MediaConnection.Token
Returns:
one of v_Bridge, v_Join, v_Loopback.

getMaxDataFlow

public Symbol getMaxDataFlow()
Description copied from interface: MediaConnection.Token
Return the MaxDataFLow Symbol for this connection.
Specified by:
getMaxDataFlow in interface MediaConnection.Token
Following copied from interface: javax.telephony.media.connection.MediaConnection.Token
Returns:
one of v_Listen, v_Talk, v_Both

getDataFlow

public Symbol getDataFlow()
Description copied from interface: MediaConnection.Token
Return the DataFLow Symbol for this connection.
Specified by:
getDataFlow in interface MediaConnection.Token
Following copied from interface: javax.telephony.media.connection.MediaConnection.Token
Returns:
one of v_Listen, v_Talk, v_Both, v_None

getToken

public MediaConnection.Token getToken()
sub-classes may override to make specialized token.
Specified by:
getToken in interface MediaConnectionEvent
Following copied from interface: javax.telephony.media.connection.MediaConnectionEvent
Returns:
the Token value

done

public void done(java.lang.Exception exception,
                 MediaConnection.Token token)

throwIfConnectionException

public void throwIfConnectionException()
                                throws MediaConnectionException

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org