RtcpHandler implements PacketHandler { @Override public boolean canHandle(byte[] packet) { return canHandle(packet, packet.length, 0); } RtcpHandler(final Scheduler scheduler, final RtpStatistics statistics); @Override int getPipelinePriority(); void setPipelinePriority(int pipelinePriority); void setChannel(DatagramChannel channel); boolean isInitial(); boolean isJoined(); void joinRtpSession(); void leaveRtpSession(); long getNextScheduledReport(); void enableSRTCP(DtlsHandler dtlsHandler); void disableSRTCP(); @Override boolean canHandle(byte[] packet); @Override boolean canHandle(byte[] packet, int dataLength, int offset); @Override byte[] handle(byte[] packet, InetSocketAddress localPeer, InetSocketAddress remotePeer); @Override byte[] handle(byte[] packet, int dataLength, int offset, InetSocketAddress localPeer, InetSocketAddress remotePeer); synchronized void reset(); int compareTo(PacketHandler o);  }
@Test public void testCanHandle() { boolean canHandleRtcp = handler.canHandle(RTCP_BYE_PACKET); boolean canHandleRtp = handler.canHandle(RTP_PACKET); Assert.assertTrue(canHandleRtcp); Assert.assertFalse(canHandleRtp); }