org.glassfish.cafe.api
Interface Participant

All Known Subinterfaces:
MediaParticipant, MSRPPlayer, MSRPRecorder, Player, Recorder, UserParticipant

public interface Participant

Represents a participant in the conversation.

Author:
binod

Method Summary
<T> void
addAgent(String name, Agent<T> agent)
          Set an agent instance in the communication.
<T> Agent<T>
getAgent(String name)
          Gets the agent from its name.
 Collection<Agent> getAgents()
          Retrieve the agent instance pertaining to the communication.
<J extends javax.media.mscontrol.join.Joinable>
J
getJoinable()
          Return the Joinable object represents this Participant.
 String getName()
          Return the user name of the participant.
 String getNickName()
          Return the nick name of the participant.
<T> Agent<T>
removeAgent(String name)
          Method to remove an agent from the participant..
 void setName(String name)
          Set the user name of the participant.
 void setNickName(String name)
          Set the nick name of the participant.
 

Method Detail

setName

void setName(String name)
Set the user name of the participant.

Parameters:
name - Name of the participant.

getName

String getName()
Return the user name of the participant.

Returns:
Name of the participant.

setNickName

void setNickName(String name)
Set the nick name of the participant.

Parameters:
name - Nick name of the participant.

getNickName

String getNickName()
Return the nick name of the participant.

Returns:
Nick name of the participant.

getJoinable

<J extends javax.media.mscontrol.join.Joinable> J getJoinable()
Return the Joinable object represents this Participant. Depending on the type of the Participant, the type of the Joinable would also change. For example, A UserParticipant will return an instance of NetworkConnection, where as a MediaParticipant will return an instance of MediaGroup

Returns:
An object of type Joinable.

addAgent

<T> void addAgent(String name,
                  Agent<T> agent)
Set an agent instance in the communication.

Type Parameters:
T - Type of Agent.
Parameters:
agent - An instance of Agent.
See Also:
Agent

getAgents

Collection<Agent> getAgents()
Retrieve the agent instance pertaining to the communication. This API returns only agents that are not call back agents.

Type Parameters:
T - Type of Agent being returned.
Returns:
Return the agent instance previously set or return null if the agent is not set.

getAgent

<T> Agent<T> getAgent(String name)
Gets the agent from its name.

Parameters:
name - Name of the Agent
Returns:
agent

removeAgent

<T> Agent<T> removeAgent(String name)
Method to remove an agent from the participant..

Type Parameters:
T - type
Parameters:
name - name of the agent.
Returns:
agent if it exists.


Copyright © 2010. All Rights Reserved.