code: public static void sendNetStreamStatus(IConnection conn, String statusCode, String description, String name, String status, Number streamId) {
          if (conn instanceof RTMPConnection) {
              Status s = new Status(statusCode);
              s.setClientid(streamId);
              s.setDesciption(description);
              s.setDetails(name);
              s.setLevel(status);
              // get the channel
              RTMPConnection rtmpConn = (RTMPConnection) conn;
              Channel channel = rtmpConn.getChannel(rtmpConn.getChannelIdForStreamId(streamId));
              channel.sendStatus(s);
          } else {
              throw new RuntimeException("Connection is not RTMPConnection: " + conn);
          }
      }
docs: Send NetStream.Status to the client.
  
  @param conn
  connection
  @param statusCode
  NetStream status code
  @param description
  description
  @param name
  name
  @param status
  The status - error, warning, or status
  @param streamId
  stream id