private void scheduleRtcp ( long timestamp , RtcpPacketType packetType ) { // Create the task and schedule it long interval = resolveInterval ( timestamp ) ; this . scheduledTask = new TxTask ( packetType ) ; try { this . reportTaskFuture = this . scheduler . schedule ( this . scheduledTask , interval , TimeUnit . MILLISECONDS ) ; // Let the RTP handler know what is the type of scheduled packet this . statistics . setRtcpPacketType ( packetType ) ; } catch ( IllegalStateException e ) { logger . warn ( "RTCP timer already canceled. No more reports will be scheduled." ) ; } }
Schedules an event to occur at a certain time .