public class SocketClient extends AbstractSiteToSiteClient
SiteToSiteClient.Builder, SiteToSiteClient.StandardSiteToSiteClientConfig| Modifier and Type | Field and Description |
|---|---|
private boolean |
closed |
private boolean |
compress |
private static org.slf4j.Logger |
logger |
private long |
penalizationNanos |
private EndpointConnectionPool |
pool |
private String |
portIdentifier |
private String |
portName |
config, siteInfoProvider| Constructor and Description |
|---|
SocketClient(SiteToSiteClientConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private RemoteDestination |
createRemoteDestination(String portId,
String portName) |
Transaction |
createTransaction(TransferDirection direction)
Creates a new Transaction that can be used to either send data to a
remote NiFi instance or receive data from a remote NiFi instance,
depending on the value passed for the
direction argument. |
private String |
getPortIdentifier(TransferDirection direction) |
boolean |
isSecure()
In order to determine whether the server is configured for secure
communications, the client may have to query the server's RESTful
interface.
|
getConfigprivate static final org.slf4j.Logger logger
private final EndpointConnectionPool pool
private final boolean compress
private final String portName
private final long penalizationNanos
private volatile String portIdentifier
private volatile boolean closed
public SocketClient(SiteToSiteClientConfig config)
public boolean isSecure()
throws IOException
SiteToSiteClientIn order to determine whether the server is configured for secure communications, the client may have to query the server's RESTful interface. Doing so could result in an IOException.
true if site-to-site communications with the remote
instance are secure, false if site-to-site communications with
the remote instance are not secure. Whether or not communications are
secure depends on the server, not the clientIOException - if unable to query the remote instance's RESTful
interface or if the remote instance is not configured to allow
site-to-site communicationsprivate String getPortIdentifier(TransferDirection direction) throws IOException
IOExceptionprivate RemoteDestination createRemoteDestination(String portId, String portName)
public Transaction createTransaction(TransferDirection direction) throws IOException
SiteToSiteClient
Creates a new Transaction that can be used to either send data to a
remote NiFi instance or receive data from a remote NiFi instance,
depending on the value passed for the direction argument.
Note: If all of the nodes are penalized (See
SiteToSiteClient.Builder.nodePenalizationPeriod(long, TimeUnit)), then this method
will return null.
direction - specifies which direction the data should be
transferred. A value of TransferDirection.SEND indicates that
this Transaction will send data to the remote instance; a value of
TransferDirection.RECEIVE indicates that this Transaction will be
used to receive data from the remote instance.null if all nodes are penalized.HandshakeException - hePortNotRunningException - pnreIOException - ioeUnknownPortException - upepublic void close()
throws IOException
IOExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.