public class GelfTCPSSLSender extends GelfTCPSender
GelfSender.CONNECTION_TIMEOUT, KEEPALIVE, MAX_WRITE_BACKOFF_TIME, READ_TIMEOUT, RETRIES, WRITE_BACKOFF_THRESHOLD, WRITE_BACKOFF_TIMEINITIAL_BUFFER_SIZE, PROPERTY_BUFFER_SIZE| Constructor and Description |
|---|
GelfTCPSSLSender(String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
int deliveryAttempts,
boolean keepAlive,
biz.paluch.logging.gelf.intern.sender.BackOff backoff,
int writeBackoffThreshold,
ErrorReporter errorReporter,
SSLContext sslContext) |
GelfTCPSSLSender(String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
int deliveryAttempts,
boolean keepAlive,
ErrorReporter errorReporter,
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(SocketChannel channel) |
protected void |
write(ByteBuffer gelfBuffer) |
createSocketChannel, sendMessagechannel, getHost, getPort, isShutdown, reportError, setChannelpublic GelfTCPSSLSender(String host, int port, int connectTimeoutMs, int readTimeoutMs, int deliveryAttempts, boolean keepAlive, ErrorReporter errorReporter, SSLContext sslContext) throws 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.IOException - in case of I/O errorspublic GelfTCPSSLSender(String host, int port, int connectTimeoutMs, int readTimeoutMs, int deliveryAttempts, boolean keepAlive, biz.paluch.logging.gelf.intern.sender.BackOff backoff, int writeBackoffThreshold, ErrorReporter errorReporter, SSLContext sslContext) throws 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.backoff - Backoff strategy to activate if a socket sender buffer is full and several attempts to write to the socket
are unsuccessful due to it.writeBackoffThreshold - attempts to write to a socket before a backoff will be activated.errorReporter - the error reporter, must not be null.sslContext - the SSL context, must not be null.IOException - in case of I/O errorsprotected boolean connect()
throws IOException
connect in class GelfTCPSenderIOExceptionprotected boolean isConnected()
throws IOException
isConnected in class AbstractNioSender<SocketChannel>IOExceptionprotected void write(ByteBuffer gelfBuffer) throws IOException
write in class GelfTCPSenderIOExceptionpublic void close()
GelfSenderclose in interface GelfSenderclose in interface Closeableclose in interface AutoCloseableclose in class AbstractNioSender<SocketChannel>protected boolean isConnected(SocketChannel channel)
isConnected in class GelfTCPSenderCopyright © 2013–2023. All rights reserved.