public class GelfTCPSender extends Object implements GelfSender
| Modifier and Type | Field and Description |
|---|---|
static String |
CONNECTION_TIMEOUT |
static String |
KEEPALIVE |
static String |
READ_TIMEOUT |
static String |
RETRIES |
| Constructor and Description |
|---|
GelfTCPSender(String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
ErrorReporter errorReporter) |
GelfTCPSender(String host,
int port,
int connectTimeoutMs,
int readTimeoutMs,
int deliveryAttempts,
boolean keepAlive,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the sender and free resources.
|
protected void |
connect() |
boolean |
sendMessage(GelfMessage message)
Send the Gelf message.
|
public static final String CONNECTION_TIMEOUT
public static final String READ_TIMEOUT
public static final String RETRIES
public static final String KEEPALIVE
public GelfTCPSender(String host, int port, int connectTimeoutMs, int readTimeoutMs, ErrorReporter errorReporter) throws IOException
host - port - connectTimeoutMs - readTimeoutMs - errorReporter - IOExceptionpublic GelfTCPSender(String host, int port, int connectTimeoutMs, int readTimeoutMs, int deliveryAttempts, boolean keepAlive, ErrorReporter errorReporter) throws IOException
host - port - connectTimeoutMs - readTimeoutMs - deliveryAttempts - keepAlive - errorReporter - IOExceptionpublic boolean sendMessage(GelfMessage message)
GelfSendersendMessage in interface GelfSendermessage - the messageprotected void connect()
throws IOException
IOExceptionpublic void close()
GelfSenderclose in interface GelfSenderclose in interface Closeableclose in interface AutoCloseableCopyright © 2013-2016. All Rights Reserved.