|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaPartner
Represents a MediaPartner.
Nested Class Summary | |
---|---|
static class |
MediaPartner.MediaOperation |
Method Summary | |
---|---|
void |
attach(UserParticipant up) Attach with the specified UserParticipant and acts as each other's partner. |
void |
detach() Detach with its user partner and restore Communication to original state before attach operation was made. |
UserParticipant |
getUserPartner() Return the UserParticipant if the MediaPartner have already attached with a UserParticipant using attach(UserParticipant) method. |
void |
play(String... uris) Start playing from the specified locations. |
void |
play(URI... uris) Start playing from the specified locations. |
void |
record(String uri) Record to specified location. |
void |
record(URI uri) Record to specified location. |
void |
setExclusive(boolean exclusive) Set exclusive flag. |
void |
stop(MediaPartner.MediaOperation operation) Stop specified operation this MediaPartner related and in progress. |
Methods inherited from interface com.oracle.sft.api.MediaParticipant |
---|
stop |
Methods inherited from interface com.oracle.sft.api.Participant |
---|
addAgent, getAgent, getAgents, getExtension, getJoinable, getName, getNickName, removeAgent, setName, setNickName |
Method Detail |
---|
void setExclusive(boolean exclusive)
attach(UserParticipant)
.exclusive
- indicate that if this MediaPartner would be exclusive. To a Communication which user participant member number is limited, such as Conversation, an exclusive MediaPartner will ask Conversation to purge the party when is replaced by this MediaPartner.void attach(UserParticipant up)
UserParticipant
and acts as each other's partner. Usually attach acts as some preparation for subsequent media operation to its user partner, such as play, record, signal receiving, ivr, etc. The attach operation happens after the MediaPartner has been added into the Communication
. The attach operation can have different details in different Communication
. Such as, in Conversation
case, we can use attach to build up the relationship with one user participant and reserve media resource.up
- The UserParticipant
to attach with.void detach()
Communication
to original state before attach operation was made.UserParticipant getUserPartner()
UserParticipant
if the MediaPartner
have already attached with a UserParticipant
using attach(UserParticipant) method.UserParticipant
.void play(URI... uris)
Conversation c = ...; MediaPartner p = c.getMediaPartner(); p.play("file:///tmp/music.au");
In this basic way, p.play(uris) can be used only when involved media resource is reserved, that means, bean should call it in CommunicationEvent.Type.ESTABLISHED or MEDIA_RESOURCE_RESERVED or EARLY_MEDIA_RESERVED. Considering method setExclusive(boolean), if exclusive is set to true, method play should be called in CommunicationEvent.ESTABLISHED, otherwise, in CommunicationEvent.Type.MEDIA_RESOURCE_RESERVED. To prepare this MediaPartner, it must be created and added into the Conversation, and then attach with one UserParticipant of the Conversation. For example, in ParticipantEvent.JOINING, Conversation c = ...; c.addParticipant(MediaPartner.class, "theMP"); UserParticipant caller = c.getCaller(); c.getMediaPartner().attach(caller);
uris
-void play(String... uris)
play(URI.create(stream));
uris
- Each location should be a form acceptable to URI.create.void record(URI uri)
uri
-void record(String uri)
uri
-void stop(MediaPartner.MediaOperation operation)
operation
-
|
Oracle Communications Converged Application Server Java API Reference 5.1 E36938-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2012 Oracle Corporation. All Rights Reserved.