public class NodeProtocolSenderImpl extends Object implements NodeProtocolSender
| Modifier and Type | Field and Description |
|---|---|
private ClusterServiceLocator |
clusterManagerProtocolServiceLocator |
private ProtocolContext<ProtocolMessage> |
protocolContext |
private SocketConfiguration |
socketConfiguration |
| Constructor and Description |
|---|
NodeProtocolSenderImpl(ClusterServiceLocator clusterManagerProtocolServiceLocator,
SocketConfiguration socketConfiguration,
ProtocolContext<ProtocolMessage> protocolContext) |
| Modifier and Type | Method and Description |
|---|---|
private Socket |
createSocket() |
SocketConfiguration |
getSocketConfiguration() |
void |
heartbeat(HeartbeatMessage msg)
Sends a "heartbeat" message to the cluster manager.
|
void |
notifyControllerStartupFailure(ControllerStartupFailureMessage msg)
Sends a failure notification if the controller was unable start.
|
void |
notifyReconnectionFailure(ReconnectionFailureMessage msg)
Sends a failure notification if the node was unable to reconnect to the
cluster
|
ConnectionResponseMessage |
requestConnection(ConnectionRequestMessage msg)
Sends a "connection request" message to the cluster manager.
|
void |
sendBulletins(NodeBulletinsMessage msg)
Sends a bulletins message to the cluster manager.
|
private void |
sendProtocolMessage(ProtocolMessage msg) |
private final SocketConfiguration socketConfiguration
private final ClusterServiceLocator clusterManagerProtocolServiceLocator
private final ProtocolContext<ProtocolMessage> protocolContext
public NodeProtocolSenderImpl(ClusterServiceLocator clusterManagerProtocolServiceLocator, SocketConfiguration socketConfiguration, ProtocolContext<ProtocolMessage> protocolContext)
public ConnectionResponseMessage requestConnection(ConnectionRequestMessage msg) throws ProtocolException, UnknownServiceAddressException
NodeProtocolSenderrequestConnection in interface NodeProtocolSendermsg - a messageProtocolException - if communication failedUnknownServiceAddressException - if the cluster manager's address
is not knownpublic void heartbeat(HeartbeatMessage msg) throws ProtocolException, UnknownServiceAddressException
NodeProtocolSenderheartbeat in interface NodeProtocolSendermsg - a messageProtocolException - if communication failedUnknownServiceAddressException - if the cluster manager's address
is not knownpublic void sendBulletins(NodeBulletinsMessage msg) throws ProtocolException, UnknownServiceAddressException
NodeProtocolSendersendBulletins in interface NodeProtocolSendermsg - a messageProtocolException - peUnknownServiceAddressException - expublic void notifyControllerStartupFailure(ControllerStartupFailureMessage msg) throws ProtocolException, UnknownServiceAddressException
NodeProtocolSendernotifyControllerStartupFailure in interface NodeProtocolSendermsg - a messageProtocolException - if communication failedUnknownServiceAddressException - if the cluster manager's address
is not knownpublic void notifyReconnectionFailure(ReconnectionFailureMessage msg) throws ProtocolException, UnknownServiceAddressException
NodeProtocolSendernotifyReconnectionFailure in interface NodeProtocolSendermsg - a messageProtocolException - if communication failedUnknownServiceAddressException - if the cluster manager's address
is not knownprivate Socket createSocket()
private void sendProtocolMessage(ProtocolMessage msg)
public SocketConfiguration getSocketConfiguration()
Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.