Package org.ow2.clif.probe.rtp
Class RTPStats
- java.lang.Object
-
- java.lang.Thread
-
- org.ow2.clif.probe.rtp.RTPStats
-
- All Implemented Interfaces:
java.lang.Runnable
public class RTPStats extends java.lang.ThreadThread to return statistics about RTP. To calculate jitter, please refer to RFC 3550.- Author:
- Rémi Druilhe
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRtcpPortToList(java.lang.Integer port)Add a port to a list to avoid decoding UDP packets from this port as RTP packets.voidclose()Close RTPStats by stopping threadjava.util.ArrayList<ParticipantStats>getByeList()Returns the list of participants which have sent a BYE packet.static RTPStatsgetInstance()Create or get the single instance of the thread.java.util.ArrayList<ParticipantStats>getParticipantsStats()Update statistics for each participantslong[]getResults()Generate statistics for monitoring every seconds.voidopenStats(java.util.ArrayList<java.lang.Integer> listeningPorts)Open sockets using RTPListener.javavoidrun()voidstartStats()Start the thread of the singleton if it hasn't been started yet.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
getInstance
public static RTPStats getInstance()
Create or get the single instance of the thread.- Returns:
- the single instance of the thread
-
openStats
public void openStats(java.util.ArrayList<java.lang.Integer> listeningPorts)
Open sockets using RTPListener.java- Parameters:
listeningPorts- : a list of ports to open.
-
startStats
public void startStats()
Start the thread of the singleton if it hasn't been started yet.
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread- See Also:
Thread.run()
-
getResults
public long[] getResults()
Generate statistics for monitoring every seconds. 0 : Packets number 1 : Cumulative number of packets lost 2 : Minimum of time jitter. 3 : Maximum of time jitter. 4 : Average of time jitter. 5 : Standard deviation of time jitter. 6 : Number of jumped packets per second. 7 : Number of inverted packets per second.- Returns:
- the results
-
getParticipantsStats
public java.util.ArrayList<ParticipantStats> getParticipantsStats()
Update statistics for each participants- Returns:
- the statistics for each participants
-
close
public void close()
Close RTPStats by stopping thread
-
addRtcpPortToList
public void addRtcpPortToList(java.lang.Integer port)
Add a port to a list to avoid decoding UDP packets from this port as RTP packets.- Parameters:
port- : the port to add to the RtcpPortList
-
getByeList
public java.util.ArrayList<ParticipantStats> getByeList()
Returns the list of participants which have sent a BYE packet.- Returns:
- the list of participants.
-
-