public class GelfTCPSSLSender extends GelfTCPSender
GelfSender.CONNECTION_TIMEOUT, KEEPALIVE, READ_TIMEOUT, RETRIESINITIAL_BUFFER_SIZE, PROPERTY_BUFFER_SIZE| Constructor and Description |
|---|
GelfTCPSSLSender(java.lang.String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
int deliveryAttempts,
boolean keepAlive,
ErrorReporter errorReporter,
javax.net.ssl.SSLContext sslContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the sender and free resources.
|
protected boolean |
connect() |
protected boolean |
isConnected() |
protected boolean |
isConnected(java.nio.channels.SocketChannel channel) |
protected void |
write(java.nio.ByteBuffer gelfBuffer) |
createSocketChannel, sendMessagechannel, getHost, getPort, isShutdown, reportError, setChannelpublic GelfTCPSSLSender(java.lang.String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
int deliveryAttempts,
boolean keepAlive,
ErrorReporter errorReporter,
javax.net.ssl.SSLContext sslContext)
throws java.io.IOException
host - the host, must not be null.port - the port.connectTimeoutMs - connection timeout, in TimeUnit.MILLISECONDS.readTimeoutMs - read timeout, in TimeUnit.MILLISECONDS.deliveryAttempts - number of delivery attempts.keepAlive - true to enable TCP keep-alive.errorReporter - the error reporter, must not be null.sslContext - the SSL context, must not be null.java.io.IOException - in case of I/O errorsprotected boolean connect()
throws java.io.IOException
connect in class GelfTCPSenderjava.io.IOExceptionprotected boolean isConnected()
throws java.io.IOException
isConnected in class AbstractNioSender<java.nio.channels.SocketChannel>java.io.IOExceptionprotected void write(java.nio.ByteBuffer gelfBuffer)
throws java.io.IOException
write in class GelfTCPSenderjava.io.IOExceptionpublic void close()
GelfSenderclose in interface GelfSenderclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AbstractNioSender<java.nio.channels.SocketChannel>protected boolean isConnected(java.nio.channels.SocketChannel channel)
isConnected in class GelfTCPSenderCopyright © 2013-2018. All Rights Reserved.