code: public void packetReceived(IBroadcastStream stream, IStreamPacket packet) {
          if (recording.get()) {
              // store everything we would need to perform a write of the stream data
              CachedEvent event = new CachedEvent();
              event.setData(packet.getData().duplicate());
              event.setDataType(packet.getDataType());
              event.setReceivedTime(System.currentTimeMillis());
              event.setTimestamp(packet.getTimestamp());
              // queue the event
              if (!queue.add(event)) {
                  log.debug("Event packet not added to recording queue");
              }
          } else {
              log.info("A packet was received by recording listener, but it's not recording anymore. {}", stream.getPublishedName());
          }
      }
docs: {@inheritDoc}