FileDocCategorySizeDatePackage
PanelOverallRtpStats.javaAPI DocJMF 2.1.1e9347Mon May 12 12:20:32 BST 2003jmapps.rtp

PanelOverallRtpStats

public class PanelOverallRtpStats extends JMPanel

Fields Summary
private SessionManager
mngrSession
private UpdateThread
threadUpdate
private Label
fieldTotalRtpPackets
private Label
fieldTotalBytes
private Label
fieldBadRtpPackets
private Label
fieldLocalCollisions
private Label
fieldRemoteCollisions
private Label
fieldPacketsLooped
private Label
fieldFailedTransmissions
private Label
fieldRtcpPackets
private Label
fieldSrPackets
private Label
fieldBadRtcpPackets
private Label
fieldUnknownRtcpTypes
private Label
fieldMalformedRr
private Label
fieldMalformedSdes
private Label
fieldMalformedBye
private Label
fieldMalformedSr
private static final String
LABEL_TOTAL_PACKETS
private static final String
LABEL_TOTAL_BYTES
private static final String
LABEL_BAD_RTP_PACKETS
private static final String
LABEL_LOCAL_COLLISIONS
private static final String
LABEL_REMOTE_COLLISIONS
private static final String
LABEL_PACKETS_LOOPED
private static final String
LABEL_FAILED_TRANSMISSIONS
private static final String
LABEL_RTCP_PACKETS
private static final String
LABEL_SR_PACKETS
private static final String
LABEL_BAD_RTCP_PACKETS
private static final String
LABEL_UNKNOWN_RTCP_TYPES
private static final String
LABEL_MALFORMED_RR
private static final String
LABEL_MALFORMED_SDES
private static final String
LABEL_MALFORMED_BYE
private static final String
LABEL_MALFORMED_SR
Constructors Summary
public PanelOverallRtpStats(SessionManager mngrSession)



          
	    super ();

        this.mngrSession = mngrSession;
        try {
            init();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    
Methods Summary
public voidaddNotify()

        super.addNotify ();

        if ( threadUpdate == null )
            threadUpdate = new UpdateThread ();
        threadUpdate.start ();
    
private voidinit()

        JMPanel     panelColumn1;
        JMPanel     panelColumn2;
        JMPanel     panelLabels;
        JMPanel     panelData;
        JMPanel     panel;
        Label       label;


        this.setLayout ( new GridLayout(1,0,24,6) );

        panelColumn1 = new JMPanel ( new BorderLayout(6,6) );
        this.add ( panelColumn1 );
        panelColumn2 = new JMPanel ( new BorderLayout(6,6) );
        this.add ( panelColumn2 );

        panel = new JMPanel ( new BorderLayout(6,6) );
        panelColumn1.add ( panel, BorderLayout.NORTH );
        panelLabels = new JMPanel ( new GridLayout(0,1,0,0) );
        panel.add ( panelLabels, BorderLayout.WEST );
        panelData = new JMPanel ( new GridLayout(0,1,0,0) );
        panel.add ( panelData, BorderLayout.CENTER );

        label = new Label ( LABEL_TOTAL_PACKETS );
        panelLabels.add ( label );
        fieldTotalRtpPackets = new Label ( "000000000000" );
        panelData.add ( fieldTotalRtpPackets );

        label = new Label ( LABEL_TOTAL_BYTES );
        panelLabels.add ( label );
        fieldTotalBytes = new Label ();
        panelData.add ( fieldTotalBytes );

        label = new Label ( LABEL_BAD_RTP_PACKETS );
        panelLabels.add ( label );
        fieldBadRtpPackets = new Label ();
        panelData.add ( fieldBadRtpPackets );

        label = new Label ( LABEL_LOCAL_COLLISIONS );
        panelLabels.add ( label );
        fieldLocalCollisions = new Label ();
        panelData.add ( fieldLocalCollisions );

        label = new Label ( LABEL_REMOTE_COLLISIONS );
        panelLabels.add ( label );
        fieldRemoteCollisions = new Label ();
        panelData.add ( fieldRemoteCollisions );

        label = new Label ( LABEL_PACKETS_LOOPED );
        panelLabels.add ( label );
        fieldPacketsLooped = new Label ();
        panelData.add ( fieldPacketsLooped );

        label = new Label ( LABEL_FAILED_TRANSMISSIONS );
        panelLabels.add ( label );
        fieldFailedTransmissions = new Label ();
        panelData.add ( fieldFailedTransmissions );

        panel = new JMPanel ( new BorderLayout(6,6) );
        panelColumn2.add ( panel, BorderLayout.NORTH );
        panelLabels = new JMPanel ( new GridLayout(0,1,0,0) );
        panel.add ( panelLabels, BorderLayout.WEST );
        panelData = new JMPanel ( new GridLayout(0,1,0,0) );
        panel.add ( panelData, BorderLayout.CENTER );

        label = new Label ( LABEL_RTCP_PACKETS );
        panelLabels.add ( label );
        fieldRtcpPackets = new Label ();
        panelData.add ( fieldRtcpPackets );

        label = new Label ( LABEL_SR_PACKETS );
        panelLabels.add ( label );
        fieldSrPackets = new Label ();
        panelData.add ( fieldSrPackets );

        label = new Label ( LABEL_BAD_RTCP_PACKETS );
        panelLabels.add ( label );
        fieldBadRtcpPackets = new Label ();
        panelData.add ( fieldBadRtcpPackets );

        label = new Label ( LABEL_UNKNOWN_RTCP_TYPES );
        panelLabels.add ( label );
        fieldUnknownRtcpTypes = new Label ();
        panelData.add ( fieldUnknownRtcpTypes );

        label = new Label ( LABEL_MALFORMED_RR );
        panelLabels.add ( label );
        fieldMalformedRr = new Label ();
        panelData.add ( fieldMalformedRr );

        label = new Label ( LABEL_MALFORMED_SDES );
        panelLabels.add ( label );
        fieldMalformedSdes = new Label ();
        panelData.add ( fieldMalformedSdes );

        label = new Label ( LABEL_MALFORMED_BYE );
        panelLabels.add ( label );
        fieldMalformedBye = new Label ();
        panelData.add ( fieldMalformedBye );

        label = new Label ( LABEL_MALFORMED_SR );
        panelLabels.add ( label );
        fieldMalformedSr = new Label ();
        panelData.add ( fieldMalformedSr );

        updateFields ();
    
public voidremoveNotify()

        if ( threadUpdate != null ) {
            threadUpdate.terminate ();
            threadUpdate = null;
        }

        super.removeNotify ();
    
private voidupdateFields()

        GlobalReceptionStats    stats;

        stats = mngrSession.getGlobalReceptionStats ();

        fieldTotalRtpPackets.setText ( "" + stats.getPacketsRecd() );
        fieldTotalBytes.setText ( "" + stats.getBytesRecd() );
        fieldBadRtpPackets.setText ( "" + stats.getBadRTPkts() );
        fieldLocalCollisions.setText ( "" + stats.getLocalColls() );
        fieldRemoteCollisions.setText ( "" + stats.getRemoteColls() );
        fieldPacketsLooped.setText ( "" + stats.getPacketsLooped() );
        fieldFailedTransmissions.setText ( "" + stats.getTransmitFailed() );
        fieldRtcpPackets.setText ( "" + stats.getRTCPRecd() );
        fieldSrPackets.setText ( "" + stats.getSRRecd() );
        fieldBadRtcpPackets.setText ( "" + stats.getBadRTCPPkts() );
        fieldUnknownRtcpTypes.setText ( "" + stats.getUnknownTypes() );
        fieldMalformedRr.setText ( "" + stats.getMalformedRR() );
        fieldMalformedSdes.setText ( "" + stats.getMalformedSDES() );
        fieldMalformedBye.setText ( "" + stats.getMalformedBye() );
        fieldMalformedSr.setText ( "" + stats.getMalformedSR() );