|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Communication
Represents a communication. Conversation, Conference etc are a type of Communication.
CommunicationSession
Nested Class Summary | |
---|---|
static class |
Communication.State
Different Communication States. |
Method Summary | ||
---|---|---|
|
addAgent(String name,
Agent<T> agent)
Set an agent instance in the communication. |
|
|
addParticipant(Class<P> type,
String name)
Add a participant to the Communication. |
|
|
addParticipant(Class<P> type,
String name,
javax.media.mscontrol.join.Joinable j)
Add a participant that can be added to the communication with a specific Joinable. |
|
void |
addParticipant(Participant p)
Add a participant to the communication. |
|
void |
addParticipant(String name)
Add a UserParticipant to the communication. |
|
void |
end()
End the conversation. |
|
|
getAgent(String name)
Gets the agent from its name. |
|
Collection<Agent> |
getAgents()
Retrieve the agent instance pertaining to the communication. |
|
Participant |
getInitiator()
Retrieves the participant who initiated the communication. |
|
String |
getName()
Return the name of the communication. |
|
|
getParticipant(Class<P> type,
String name)
Retrieve a Participant from the Communication. |
|
Participant |
getParticipant(String name)
Retrieve a Participant from the Communication. |
|
Communication.State |
getState()
Return the current state of communication. |
|
|
removeAgent(String name)
Method to remove an agent from the communication. |
|
void |
removeParticipant(Participant p)
Remove a participant from the communication. |
|
void |
removeParticipant(String name)
Remove any type of participant from the communication. |
|
void |
replaceParticipant(Participant from,
Participant to)
Replace a participant with another Participant. |
Method Detail |
---|
void addParticipant(String name)
UserParticipant
to the communication. Executing this
method will initiate a call with that participant. Following is an
example code. An IllegalArgumentException will be thrown if a participant
of the same name already exists.
Communication c = ....;
c.addParticipant("alice@example.com");
name
- Name of the UserParticipant
void addParticipant(Participant p)
p
- Add a participant to the communicaton.<P extends Participant> void addParticipant(Class<P> type, String name)
Communication c = ....;
c.addParticipant(Recorder.class, "recorder-1");
P
- Any Participant type that extends a MediaParticipant.type
- Any Class
that extends MediaParticipant class.name
- Name of the participant<P extends Participant> void addParticipant(Class<P> type, String name, javax.media.mscontrol.join.Joinable j)
Communication c = ....;
MediaGroup mg = ....; //Get/create mediagroup.
c.createMediaParticipant(Recorder.class, "recorder-1", mg);
The Joinable passed in can be retrieved using getJoinable method. If it
is null, then a new JSR 309 Joinable will be created by CAFE.
P
- Any Participant type that extends a MediaParticipant.type
- Any Class
that extends MediaParticipant class.name
- Name of the participantj
- An instance of Joinable
object.void removeParticipant(String name)
name
- Name of the Participant
void removeParticipant(Participant p)
p
- Participant object.Participant getParticipant(String name)
Participant
from the Communication.
name
- Name of the Participant
<P extends Participant> P getParticipant(Class<P> type, String name)
Participant
from the Communication.
P
- A sub-type of a Participant.name
- Name of the Participant
type
- Type of the participant.
void replaceParticipant(Participant from, Participant to)
removeParticipant(Participant)
followed by
addparticipant(Participant)
. For example, if both the
Participants contain the same Joinable
, CAFE might consider
a very simple object replacement, rather than a more intensive
Participant replacement that might involve sending re-INVItes to put the
Participants on hold.a
from
- Participant
to be replaced.to
- New Participant
that replaces the fromvoid end()
Communication.State getState()
String getName()
Conversation
,
Conference
Participant getInitiator()
Participant
<T> void addAgent(String name, Agent<T> agent)
T
- Type of Agent.agent
- An instance of Agent.Agent
Collection<Agent> getAgents()
<T> Agent<T> getAgent(String name)
name
- Name of the Agent
<T> Agent<T> removeAgent(String name)
T
- typename
- name of the agent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |