Search in sources :

Example 1 with BeatsChannelResponse

use of org.apache.nifi.processors.beats.response.BeatsChannelResponse in project nifi by apache.

the class ListenBeats method respond.

protected void respond(final BeatsEvent event, final BeatsResponse beatsResponse) {
    final ChannelResponse response = new BeatsChannelResponse(beatsEncoder, beatsResponse);
    final ChannelResponder responder = event.getResponder();
    responder.addResponse(response);
    try {
        responder.respond();
    } catch (IOException e) {
        getLogger().error("Error sending response for transaction {} due to {}", new Object[] { event.getSeqNumber(), e.getMessage() }, e);
    }
}
Also used : BeatsChannelResponse(org.apache.nifi.processors.beats.response.BeatsChannelResponse) ChannelResponder(org.apache.nifi.processor.util.listen.response.ChannelResponder) ChannelResponse(org.apache.nifi.processor.util.listen.response.ChannelResponse) BeatsChannelResponse(org.apache.nifi.processors.beats.response.BeatsChannelResponse) IOException(java.io.IOException)

Aggregations

IOException (java.io.IOException)1 ChannelResponder (org.apache.nifi.processor.util.listen.response.ChannelResponder)1 ChannelResponse (org.apache.nifi.processor.util.listen.response.ChannelResponse)1 BeatsChannelResponse (org.apache.nifi.processors.beats.response.BeatsChannelResponse)1