JSR-043: JTAPI-1.4

javax.telephony.media.provider
Class Base_Owner

java.lang.Object
  |
  +--javax.telephony.media.provider.Base_Owner
All Implemented Interfaces:
MPI.Owner
Direct Known Subclasses:
Base_ContainerService, Base_MediaService, NullGroupProvider

public class Base_Owner
extends java.lang.Object
implements MPI.Owner

A class that owns an EventQueue, and is an MPI.Owner to DispatchableEvents. Implements the basic structures to manage the EventQueue and dispatch events.

Since:
JTAPI-1.4

Method Summary
 void addListener(java.util.EventListener listener)
          Add EventListener to this object's EventQueue.
 void onEventDone(Base.Event event)
          To be a Base.Event "source" you must be an Owner.
 void removeListener(java.util.EventListener listener)
          Remove EventListener from this object's EventQueue.
 void setExceptionHandler(Dispatcher.ExceptionHandler handler)
          Set a Dispatcher.ExceptionHandler for this Owner/Source.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setExceptionHandler

public void setExceptionHandler(Dispatcher.ExceptionHandler handler)
Set a Dispatcher.ExceptionHandler for this Owner/Source.

addListener

public void addListener(java.util.EventListener listener)
Add EventListener to this object's EventQueue.
Parameters:
listener - the EventListener to be added

removeListener

public void removeListener(java.util.EventListener listener)
Remove EventListener from this object's EventQueue.
Parameters:
listener - the EventListener to be removed

onEventDone

public void onEventDone(Base.Event event)
To be a Base.Event "source" you must be an Owner.

Implements MPI.Owner

The vendor's implementation notifies this MPI.Owner that some Async.Event has completed. This Owner must deliver the event to the application, invoking the various Listeners.

This MPI.Owner implementation uses the the EventQueue and Dispatcher in this package; which assume that the Async.Event implements Dispatcher.DispatchableEvent; so the event knows how to recognize and invoke its own Listener and Callback method.

Note:We would rather this was not a public method, but the Java interface allows only public methods. If an application Listener were to invoke this, it would make a nice infinite loop...

Specified by:
onEventDone in interface MPI.Owner
Parameters:
event - a done Event that will be queued for dispatch to application Listeners.

JSR-043: JTAPI-1.4

Send comments to: JSR-43@ectf.org