FileDocCategorySizeDatePackage
Participant.javaAPI DocJMF 2.1.1e4758Mon May 12 12:20:40 BST 2003javax.media.rtp

Participant

public interface Participant
This interface represents one participant in an RTP session. Within a session, a participant is defined to be the application sending and receiving data on that session. Note that this doesn't necessarily imply that participants are human. A single participant may be the source of zero or more streams of RTP data packets, each of which is represented by an RTPStream object obtainable via the getStreams().

RTPSM only creates instances of the two subclasses of this class, RTPRemoteParticipant and RTPLocalParticipant. Of all the Participants objects managed by the RTPSessionManager, only one is the local participant and thus an instance of RTPLocalParticipant.

All the other Participants in the session (obtainable via RTPSM.getRemoteParticipants()) are "remote" and are instances of RTPRemoteParticipant; calls to getStreams() on remote participants return a Vector of ReceiveStream objects. The client can determine whether an Participant is local doing a simple "instanceof" test.

Participants are identified by the CNAME string, which is transmitted in every RTCP packet.Since a participant may begin sending data packets *before* the CNAME of the participant has arrived in an RTCP packet, it is possible that a data stream will exist, for a short time, as "unassociated" with any participant. See ReceiveStream for more details.

Note that this abstraction defines a participant *within* a session; in real life, "participants" can be involved in more than one RTP session at a time.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringgetCNAME()
Provides a quick method to get the CNAME of this participant. This value can also be obtained from the RTCPReport objects returned through getReports() on this participant.

return
the CNAME identifying this participant.

public java.util.VectorgetReports()
Returns a Vector of RTCPReport objects, each representing the most recent RTCP report for an SSRC sent by this participant. In most cases, this Vector will contain exactly one report, be it an SR or RR, because most participants (passive receivers and single-stream senders) only send out one SSRC. The exceptions are those participants sending multiple data streams, in which case there will be one report per stream (i.e. per SSRC); these reports would also be accessible via the getReport() call on each individual RTPStream.

public java.util.VectorgetSourceDescription()
Returns a Vector of RTCPSourceDescription objects. Each such object is one field from the most recent RTCP SDES packet for this participant. Since typically the most recent SDES packet will not contain all of the RTCPSourceDescription objects simultaneously, the returned Vector contains the most recent SDES type received from this participant, possibly from many RTCP reports. (Each of the returned SDES types therefore may not be from the latest RTCP report necessarliy). A convenient method to get at the source description without having to go through calling getReports(), enumerating the Vector, and then calling getSourceDescription() on the RTCPReport.

return
the Vector representing the latest SDES report from this participant. May be an empty Vector.

public java.util.VectorgetStreams()
Retrieves a Vector which is the set of all RTPStream objects for this participant. Note that if the participant is not sending a stream of RTP packets (i.e. it is a "passive" participant),this method will return an empty Vector. Note that if this call is made after data has started coming in from a new SSRC from this participant, but before an RTCP packet has arrived to map that SSRC to this participant, that receive stream will not turn up in this call; when and if said RTCP packet arrives and the orphan stream can be associated with an Participant, the recvStreamMapped callback will be issued to all RTPSessionListeners.

If this is the local participant, the returned Vector will contain null. if it is a remote participant it will contain ReceiveStream objects.

return
the Vector of RTPStream objects.