org.jvoicexml.callmanager.jtapi
Class TerminalMedia

java.lang.Object
  extended by org.jvoicexml.callmanager.jtapi.TerminalMedia
All Implemented Interfaces:
Runnable

public abstract class TerminalMedia
extends Object
implements Runnable

Thread to process a media stream from a given URI.

Since:
0.6
Version:
$Revision: 2355 $
Author:
lyncher

Constructor Summary
TerminalMedia(net.sourceforge.gjtapi.media.GenericMediaService service)
          Constructs a new object.
 
Method Summary
protected  net.sourceforge.gjtapi.media.GenericMediaService getMediaService()
          Retrieves the media service.
protected  void handleStartProcessing()
          May be overridden to handle further processing in a atart processing request.
protected  void handleStopProcessing()
          May be overridden to handle further processing in a stop processing request.
 boolean isBusy()
          Checks if media is currently being processed.
abstract  void process(URI uri, javax.telephony.media.RTC[] rtc, Dictionary<?,?> optargs)
          Processes the given URIs..
 void processURI(URI uri, Map<String,String> parameters)
          Processes the given URI.
 void run()
          
 void start()
          Starts this media service.
 void startProcessing()
          Starts processing of media.
 void stop()
          Stops this media service.
 void stopProcessing()
          Stops processing of media.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerminalMedia

public TerminalMedia(net.sourceforge.gjtapi.media.GenericMediaService service)
Constructs a new object.

Parameters:
service - media service to stream the audio.
Method Detail

getMediaService

protected final net.sourceforge.gjtapi.media.GenericMediaService getMediaService()
Retrieves the media service.

Returns:
the media service.

start

public final void start()
Starts this media service.


stop

public final void stop()
Stops this media service.


processURI

public final void processURI(URI uri,
                             Map<String,String> parameters)
Processes the given URI.

Parameters:
uri - URI to process.
parameters - Map
Stuff to complete
What happens if same URI is inserted twice? TRASH!

stopProcessing

public final void stopProcessing()
Stops processing of media.


handleStopProcessing

protected void handleStopProcessing()
May be overridden to handle further processing in a stop processing request.


startProcessing

public final void startProcessing()
Starts processing of media.


handleStartProcessing

protected void handleStartProcessing()
May be overridden to handle further processing in a atart processing request.


isBusy

public final boolean isBusy()
Checks if media is currently being processed.

Returns:
true if media is being processed.

process

public abstract void process(URI uri,
                             javax.telephony.media.RTC[] rtc,
                             Dictionary<?,?> optargs)
                      throws javax.telephony.media.MediaResourceException
Processes the given URIs..

Parameters:
uri - URI to process.
rtc - run time control of the telephony connection
optargs - optional arguments
Throws:
javax.telephony.media.MediaResourceException - error processing the URI

run

public final void run()

Specified by:
run in interface Runnable


Copyright © 2005-2009JVoiceXML group.