public class GelfConfiguration extends Object
GelfTransport.| Constructor and Description |
|---|
GelfConfiguration()
Creates a new configuration with the local hostname ("127.0.0.1") and the default port (12201).
|
GelfConfiguration(InetSocketAddress remoteAddress)
Creates a new configuration with the given remote address.
|
GelfConfiguration(int port)
Creates a new configuration with the local hostname ("127.0.0.1") and the given port.
|
GelfConfiguration(String hostname)
Creates a new configuration with the given hostname and the default port (12201).
|
GelfConfiguration(String hostname,
int port)
Creates a new configuration with the given hostname and port.
|
| Modifier and Type | Method and Description |
|---|---|
GelfConfiguration |
connectTimeout(int connectTimeout)
Set the connection timeout for TCP connections in milliseconds.
|
GelfConfiguration |
disableTls()
Disable TLS for transport.
|
GelfConfiguration |
disableTlsCertVerification()
Disable TLS certificate verification for transport.
|
GelfConfiguration |
enableTls()
Enable TLS for transport.
|
GelfConfiguration |
enableTlsCertVerification()
Enable TLS certificate verification for transport.
|
int |
getConnectTimeout()
Get the connection timeout for TCP connections in milliseconds.
|
String |
getHostname()
Get the hostname of the GELF server.
|
int |
getMaxInflightSends()
Get the number of max queued network operations.
|
int |
getPort()
Get the port of the GELF server.
|
int |
getQueueSize()
Get the size of the internally used
BlockingQueue. |
int |
getReconnectDelay()
Get the time to wait between reconnects in milliseconds.
|
InetSocketAddress |
getRemoteAddress()
Get the remote address of the GELF server.
|
int |
getSendBufferSize()
Get the size of the socket send buffer in bytes.
|
File |
getTlsTrustCertChainFile()
Get the trust certificate chain file for the TLS connection.
|
GelfTransports |
getTransport()
Get the transport protocol used with the GELF server.
|
boolean |
isTcpKeepAlive() |
boolean |
isTcpNoDelay()
Whether Nagle's algorithm is enabled for TCP connections.
|
boolean |
isTlsCertVerificationEnabled()
Check if TLS certificate verification is enabled.
|
boolean |
isTlsEnabled()
Check if TLS option for the transport is enabled.
|
GelfConfiguration |
maxInflightSends(int maxInflightSends)
Set the number of max queued network operations.
|
GelfConfiguration |
queueSize(int size)
Set the size of the internally used
BlockingQueue. |
GelfConfiguration |
reconnectDelay(int reconnectDelay)
Set the time to wait between reconnects in milliseconds.
|
GelfConfiguration |
sendBufferSize(int sendBufferSize)
Set the size of the socket send buffer in bytes.
|
GelfConfiguration |
tcpKeepAlive(boolean tcpKeepAlive) |
GelfConfiguration |
tcpNoDelay(boolean tcpNoDelay)
Whether to use Nagle's algorithm for TCP connections.
|
GelfConfiguration |
tlsTrustCertChainFile(File tlsTrustCertChainFile)
Set the trust certificate chain file for the TLS connection.
|
GelfConfiguration |
transport(GelfTransports transport)
Set the transport protocol used with the GELF server.
|
public GelfConfiguration(String hostname, int port)
hostname - The hostname of the GELF-enabled serverport - The port of the GELF-enabled serverpublic GelfConfiguration(InetSocketAddress remoteAddress)
remoteAddress - The InetSocketAddress of the GELF serverpublic GelfConfiguration(String hostname)
hostname - The hostname of the GELF-enabled serverpublic GelfConfiguration(int port)
port - The port of the GELF-enabled serverpublic GelfConfiguration()
public String getHostname()
public int getPort()
public InetSocketAddress getRemoteAddress()
public GelfTransports getTransport()
public GelfConfiguration transport(GelfTransports transport)
transport - the transport protocol used with the GELF serverthis instancepublic int getQueueSize()
BlockingQueue.public GelfConfiguration queueSize(int size)
BlockingQueue.size - the size of the internally used queuethis instancepublic boolean isTlsEnabled()
true if TLS is enabled, false if disabledpublic GelfConfiguration enableTls()
this instancepublic GelfConfiguration disableTls()
this instancepublic File getTlsTrustCertChainFile()
public GelfConfiguration tlsTrustCertChainFile(File tlsTrustCertChainFile)
tlsTrustCertChainFile - the trust certificate chain filethis instancepublic boolean isTlsCertVerificationEnabled()
true if enabled, false if disabledpublic GelfConfiguration enableTlsCertVerification()
this instancepublic GelfConfiguration disableTlsCertVerification()
this instancepublic int getReconnectDelay()
public GelfConfiguration reconnectDelay(int reconnectDelay)
reconnectDelay - the time to wait between reconnects in millisecondsthis instancepublic int getConnectTimeout()
ChannelOption.CONNECT_TIMEOUT_MILLISpublic GelfConfiguration connectTimeout(int connectTimeout)
connectTimeout - the connection timeout for TCP connections in millisecondsthis instanceChannelOption.CONNECT_TIMEOUT_MILLISpublic boolean isTcpNoDelay()
true if Nagle's algorithm is being used for TCP connectionsChannelOption.TCP_NODELAYpublic GelfConfiguration tcpNoDelay(boolean tcpNoDelay)
tcpNoDelay - true if Nagle's algorithm should used for TCP connections, false otherwisethis instanceChannelOption.TCP_NODELAYpublic boolean isTcpKeepAlive()
public GelfConfiguration tcpKeepAlive(boolean tcpKeepAlive)
public int getSendBufferSize()
ChannelOption.SO_SNDBUFpublic GelfConfiguration sendBufferSize(int sendBufferSize)
sendBufferSize - the size of the socket send buffer in bytes.
A value of -1 deactivates the socket send buffer.this instanceChannelOption.SO_SNDBUFpublic int getMaxInflightSends()
public GelfConfiguration maxInflightSends(int maxInflightSends)
maxInflightSends - max number of queued network operationsthis instanceCopyright © 2016 TORCH. All rights reserved.