public class SocketChannelSender extends ChannelSender
| Modifier and Type | Field and Description |
|---|---|
protected SocketChannel |
channel |
protected SocketChannelOutputStream |
socketChannelOutput |
host, lastUsed, logger, maxSendBufferSize, port, timeout| Constructor and Description |
|---|
SocketChannelSender(String host,
int port,
int maxSendBufferSize,
ComponentLog logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the underlying channel
|
OutputStream |
getOutputStream() |
boolean |
isConnected() |
void |
open()
Opens the connection to the destination.
|
private void |
updateLastUsed() |
protected void |
write(byte[] data)
Write the given buffer to the underlying channel.
|
getLastUsed, getTimeout, send, send, setTimeoutprotected SocketChannel channel
protected SocketChannelOutputStream socketChannelOutput
public SocketChannelSender(String host, int port, int maxSendBufferSize, ComponentLog logger)
public void open()
throws IOException
ChannelSenderopen in class ChannelSenderIOException - if an error occurred opening the connection.protected void write(byte[] data)
throws IOException
ChannelSenderwrite in class ChannelSenderIOExceptionpublic boolean isConnected()
isConnected in class ChannelSenderpublic void close()
ChannelSenderclose in class ChannelSenderpublic OutputStream getOutputStream()
private void updateLastUsed()
Copyright © 2019 Apache NiFi Project. All rights reserved.