public class ClusterManagerProtocolSenderListener extends Object implements ClusterManagerProtocolSender, ProtocolListener
| Modifier and Type | Field and Description |
|---|---|
private ProtocolListener |
listener |
private ClusterManagerProtocolSender |
sender |
| Constructor and Description |
|---|
ClusterManagerProtocolSenderListener(ClusterManagerProtocolSender sender,
ProtocolListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(ProtocolHandler handler)
Registers a handler with the listener.
|
void |
assignPrimaryRole(PrimaryRoleAssignmentMessage msg)
Sends an "assign primary role" message to a node.
|
void |
disconnect(DisconnectMessage msg)
Sends a "disconnection request" message to a node.
|
Collection<ProtocolHandler> |
getHandlers() |
boolean |
isRunning() |
boolean |
removeHandler(ProtocolHandler handler)
Unregisters the handler with the listener.
|
FlowResponseMessage |
requestFlow(FlowRequestMessage msg)
Sends a "flow request" message to a node.
|
ReconnectionResponseMessage |
requestReconnection(ReconnectionRequestMessage msg)
Sends a "reconnection request" message to a node.
|
void |
setBulletinRepository(BulletinRepository bulletinRepository)
Sets the
BulletinRepository that can be used to report bulletins |
void |
start()
Starts the instance for listening for messages.
|
void |
stop()
Stops the instance from listening for messages.
|
private final ClusterManagerProtocolSender sender
private final ProtocolListener listener
public ClusterManagerProtocolSenderListener(ClusterManagerProtocolSender sender, ProtocolListener listener)
public void stop()
throws IOException
ProtocolListenerstop in interface ProtocolListenerIOExceptionpublic void start()
throws IOException
ProtocolListenerstart in interface ProtocolListenerIOExceptionpublic boolean isRunning()
isRunning in interface ProtocolListenerpublic boolean removeHandler(ProtocolHandler handler)
ProtocolListenerremoveHandler in interface ProtocolListenerhandler - a handlerpublic Collection<ProtocolHandler> getHandlers()
getHandlers in interface ProtocolListenerpublic void addHandler(ProtocolHandler handler)
ProtocolListeneraddHandler in interface ProtocolListenerhandler - a handlerpublic void setBulletinRepository(BulletinRepository bulletinRepository)
ClusterManagerProtocolSenderBulletinRepository that can be used to report bulletinssetBulletinRepository in interface ClusterManagerProtocolSendersetBulletinRepository in interface ProtocolListenerpublic FlowResponseMessage requestFlow(FlowRequestMessage msg) throws ProtocolException
ClusterManagerProtocolSenderrequestFlow in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if communication failedpublic ReconnectionResponseMessage requestReconnection(ReconnectionRequestMessage msg) throws ProtocolException
ClusterManagerProtocolSenderrequestReconnection in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if communication failedpublic void disconnect(DisconnectMessage msg) throws ProtocolException
ClusterManagerProtocolSenderdisconnect in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if communication failedpublic void assignPrimaryRole(PrimaryRoleAssignmentMessage msg) throws ProtocolException
ClusterManagerProtocolSenderassignPrimaryRole in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if communication failedCopyright © 2015 Apache NiFi(incubating) Project. All rights reserved.