net.sf.fmj.media.rtp
Class RTPParticipant

java.lang.Object
  extended by net.sf.fmj.media.rtp.RTPParticipant
All Implemented Interfaces:
Participant
Direct Known Subclasses:
RTPLocalParticipant, RTPRemoteParticipant

public class RTPParticipant
extends java.lang.Object
implements Participant

Represents an RTP participant

Version:
1-1-alpha3
Author:
Andrew G D Rowley, Christian Vincenot

Field Summary
protected  long lastReportTime
           
protected  java.util.HashMap sourceDescriptions
           
 
Constructor Summary
RTPParticipant(java.lang.String cName)
          Creates a new RTPParticipant
 
Method Summary
 void addReport(Report report)
          Adds an RTCP Report for this participant
protected  void addSourceDescription(SourceDescription sdes)
          Adds a source description item to the participant
protected  void addStream(RTPStream stream)
          Adds a stream to the participant
 java.lang.String getCNAME()
          Returns this participant's RTP CNAME.
 long getLastReportTime()
          Returns this participant's last report time, which is the last time he's sent us a report.
 java.util.Vector getReports()
          Returns the reports associated with this participant.
 int getSdesSize()
          Returns the number of bytes of sdes that this participant requires.
 java.util.Vector getSourceDescription()
          Returns the sources descriptions (SDES) associated with this participant.
 java.util.Vector getStreams()
          Returns the streams associated with this participant.
 boolean isActive()
          Returns true if the participant is active
protected  void removeStream(RTPStream stream)
          Removes the specified stream from this participant's associated streams list.
protected  void setActive(boolean active)
          Sets the participant active or inactive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceDescriptions

protected java.util.HashMap sourceDescriptions

lastReportTime

protected long lastReportTime
Constructor Detail

RTPParticipant

public RTPParticipant(java.lang.String cName)
Creates a new RTPParticipant

Parameters:
cName - the RTP CNAME of this participant.
Method Detail

getStreams

public java.util.Vector getStreams()
Returns the streams associated with this participant.

Specified by:
getStreams in interface Participant
Returns:
the streams associated with this participant

getReports

public java.util.Vector getReports()
Returns the reports associated with this participant.

Specified by:
getReports in interface Participant
Returns:
the reports associated with this participant

getCNAME

public java.lang.String getCNAME()
Returns this participant's RTP CNAME.

Specified by:
getCNAME in interface Participant
Returns:
this participant's RTP CNAME

getSourceDescription

public java.util.Vector getSourceDescription()
Returns the sources descriptions (SDES) associated with this participant.

Specified by:
getSourceDescription in interface Participant
Returns:
the sources descriptions (SDES) associated with this participant

isActive

public boolean isActive()
Returns true if the participant is active

Returns:
true if the participant is active

setActive

protected void setActive(boolean active)
Sets the participant active or inactive

Parameters:
active - Activity of the participant, true if active

addStream

protected void addStream(RTPStream stream)
Adds a stream to the participant

Parameters:
stream - stream to associate with this participant

removeStream

protected void removeStream(RTPStream stream)
Removes the specified stream from this participant's associated streams list.

Parameters:
stream - the stream to erase

addSourceDescription

protected void addSourceDescription(SourceDescription sdes)
Adds a source description item to the participant

Parameters:
sdes - The SDES item to add

getSdesSize

public int getSdesSize()
Returns the number of bytes of sdes that this participant requires.

Returns:
the number of bytes of sdes that this participant requires

addReport

public void addReport(Report report)
Adds an RTCP Report for this participant

Parameters:
report - The report to add

getLastReportTime

public long getLastReportTime()
Returns this participant's last report time, which is the last time he's sent us a report.

Returns:
the participant's last report time