Package org.apache.nifi.cluster.protocol
Interface ProtocolHandler
public interface ProtocolHandler
A handler for processing protocol messages.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(ProtocolMessage msg) handle(ProtocolMessage msg, Set<String> nodeIdentities) Handles the given protocol message or throws an exception if it cannot handle the message.
-
Method Details
-
handle
Handles the given protocol message or throws an exception if it cannot handle the message. If no response is needed by the protocol, then null should be returned.- Parameters:
msg- a messagenodeIdentities- the set of identities for this node- Returns:
- a response or null, if no response is necessary
- Throws:
ProtocolException- if the message could not be processed
-
canHandle
- Parameters:
msg- a message- Returns:
- true if the handler can process the given message; false otherwise
-