Search in sources :

Example 1 with FlowResponseMessage

use of org.apache.nifi.cluster.protocol.message.FlowResponseMessage in project nifi by apache.

the class StandardFlowService method handleFlowRequest.

private FlowResponseMessage handleFlowRequest(final FlowRequestMessage request) throws ProtocolException {
    readLock.lock();
    try {
        logger.info("Received flow request message from manager.");
        // create the response
        final FlowResponseMessage response = new FlowResponseMessage();
        response.setDataFlow(createDataFlowFromController());
        return response;
    } catch (final Exception ex) {
        throw new ProtocolException("Failed serializing flow controller state for flow request due to: " + ex, ex);
    } finally {
        readLock.unlock();
    }
}
Also used : ProtocolException(org.apache.nifi.cluster.protocol.ProtocolException) FlowResponseMessage(org.apache.nifi.cluster.protocol.message.FlowResponseMessage) FlowSerializationException(org.apache.nifi.controller.serialization.FlowSerializationException) ConnectionException(org.apache.nifi.cluster.ConnectionException) FlowSynchronizationException(org.apache.nifi.controller.serialization.FlowSynchronizationException) LifeCycleStartException(org.apache.nifi.lifecycle.LifeCycleStartException) NoClusterCoordinatorException(org.apache.nifi.cluster.exception.NoClusterCoordinatorException) IOException(java.io.IOException) ProtocolException(org.apache.nifi.cluster.protocol.ProtocolException)

Aggregations

IOException (java.io.IOException)1 ConnectionException (org.apache.nifi.cluster.ConnectionException)1 NoClusterCoordinatorException (org.apache.nifi.cluster.exception.NoClusterCoordinatorException)1 ProtocolException (org.apache.nifi.cluster.protocol.ProtocolException)1 FlowResponseMessage (org.apache.nifi.cluster.protocol.message.FlowResponseMessage)1 FlowSerializationException (org.apache.nifi.controller.serialization.FlowSerializationException)1 FlowSynchronizationException (org.apache.nifi.controller.serialization.FlowSynchronizationException)1 LifeCycleStartException (org.apache.nifi.lifecycle.LifeCycleStartException)1