|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
MediaService
Old MediaTerminalConnection class. Replaced in JTAPI-1.3 by the MediaService interface, which delegates resource management and media stream state control from the telephony application to the provider implementation. This makes applications simpler and allows multiple applications to easily share access to the provider's plaform; because the provider software controls access, and applications don't build competing frameworks for each platform.
The media interface consists of a base media API which supports all of the various types of media-based telephony applications. A simplier, voice-based API exist for applications which desire only the most simply voice-based media features. The base media API is still under development. This specification only represent the voice API.
The voice API supports the following applications: routing voice data to/from the telephone line to/from a workstation's speaker of microphone; routing voice data to/from the telephone line to/from audio files; starting and stoping of playing and recording; and DTMF tone detection.
In this specification, "playing" is defined as sending information to the telephone line. For example, an application would "play" an audio file to the telephone line for the opposite parties to hear. The term "recording" is defines as receiving information from the telephone line. For example, an application may "record" data from the telephone line into a file on disk.
Field Summary | |
static int |
AVAILABLE
Deprecated. Media is currently available on this terminal connection. |
static int |
NOACTIVITY
Deprecated. There is currently no activity on this TerminalConnection. |
static int |
PLAYING
Deprecated. There is currently playing on this terminal connection. |
static int |
RECORDING
Deprecated. There is currently recording on this terminal connection. |
static int |
UNAVAILABLE
Deprecated. Media is currently not available on this terminal connection. |
Fields inherited from interface javax.telephony.TerminalConnection |
ACTIVE, DROPPED, IDLE, PASSIVE, RINGING, UNKNOWN |
Method Summary | |
void |
generateDtmf(java.lang.String digits)
Deprecated. Generates one or more DTMF tones. |
int |
getMediaAvailability()
Deprecated. Returns the current media availability state, either AVAILABLE or UNAVAILABLE. |
int |
getMediaState()
Deprecated. Returns the current state of the terminal connection as a bit mask of PLAYING and RECORDING. |
void |
setDtmfDetection(boolean enable)
Deprecated. Sets the DTMF tone detection either on or off. |
void |
startPlaying()
Deprecated. Start the playing. |
void |
startRecording()
Deprecated. Start the recording. |
void |
stopPlaying()
Deprecated. Stop the playing. |
void |
stopRecording()
Deprecated. Stop the recording. |
void |
useDefaultMicrophone()
Deprecated. Instructs the terminal connection to use the default microphone for playing to the telephone line. |
void |
useDefaultSpeaker()
Deprecated. Instructs the terminal connection to use the default speaker for recording from the telephone line. |
void |
usePlayURL(java.net.URL url)
Deprecated. Instructs the terminal connection to use a file for playing to the telephone line. |
void |
useRecordURL(java.net.URL url)
Deprecated. Instructs the terminal connection to use a file for recording from the telephone line. |
Methods inherited from interface javax.telephony.TerminalConnection |
answer, getCapabilities, getConnection, getState, getTerminal, getTerminalConnectionCapabilities |
Field Detail |
public static final int AVAILABLE
public static final int UNAVAILABLE
public static final int PLAYING
public static final int RECORDING
public static final int NOACTIVITY
Method Detail |
public int getMediaAvailability()
public int getMediaState()
MediaTerminalConnection.NOACTIVITY
.
public void useDefaultSpeaker() throws PrivilegeViolationException, ResourceUnavailableException, MethodNotSupportedException
PrivilegeViolationException
- Indicates the application is
not permitted to direct voice media to the default speaker.ResourceUnavailableException
- Indicates that the speaker is
not currently available for use.MethodNotSupportedException
- This method is not supported by
the implementation.public void useRecordURL(java.net.URL url) throws PrivilegeViolationException, ResourceUnavailableException, MethodNotSupportedException
url
- The URL-destination for the voice data for recording.PrivilegeViolationException
- Indicates the application is not
permitted to use the give URL for recording.ResourceUnavailableException
- Indicates the URL given is not
available, either because the URL was invalid or a network problem
occurred.MethodNotSupportedException
- This method is not supported by
the implementation.public void useDefaultMicrophone() throws PrivilegeViolationException, ResourceUnavailableException, MethodNotSupportedException
PrivilegeViolationException
- Indicates the application is
not permitted to direct voice media from the default microphone.ResourceUnavailableException
- Indicates that the microphone is
not currently available for use.MethodNotSupportedException
- This method is not supported by
the implementation.public void usePlayURL(java.net.URL url) throws PrivilegeViolationException, ResourceUnavailableException, MethodNotSupportedException
url
- The URL-source of the voice data to play.
valid or available source of voice data.PrivilegeViolationException
- Indicates the application is not
permitted to use the give URL for playing.ResourceUnavailableException
- Indicates the URL given is not
available, either because the URL was invalid or a network problem
occurred.MethodNotSupportedException
- This method is not supported by
the implementation.public void startPlaying() throws MethodNotSupportedException, ResourceUnavailableException, InvalidStateException
MethodNotSupportedException
- The implementation does not
support playing to the telephone line.ResourceUnavailableException
- Indicates playing is not able
to be started because some resource is unavailable.InvalidStateException
- Indicates the TerminalConnection is not
in the media channel available state.public void stopPlaying()
public void startRecording() throws MethodNotSupportedException, ResourceUnavailableException, InvalidStateException
MethodNotSupportedException
- The implementation does not
support recording from the telephone line.ResourceUnavailableException
- Indicates recording is not able
to be started because some resource is unavailable.InvalidStateException
- Indicates the TerminalConnection is not
in the media channel available state.public void stopRecording()
public void setDtmfDetection(boolean enable) throws MethodNotSupportedException, ResourceUnavailableException, InvalidStateException
enable
- If true, turns DTMF-tone detection on, if false, turns
DTMF-tone detection off.MethodNotSupportedException
- The implementation does not
support the detection of DTMF-tones.ResourceUnavailableException
- Indicates DTMF-detection cannot
be started because some resource is unavailable.InvalidStateException
- Indicates the TerminalConnection is not
in the media channel available state.public void generateDtmf(java.lang.String digits) throws MethodNotSupportedException, ResourceUnavailableException, InvalidStateException
digits
- The string of DTMF-tone digits to generate on the telephone
line.MethodNotSupportedException
- The implementation does not
support generating DTMF tones.ResourceUnavailableException
- Indicates the generating of DTMF
tones cannot be done because some resource is unavailable.InvalidStateException
- Indicates the TerminalConnection is not
in the media channel available state.
|
JSR-043: JTAPI-1.4 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |