Package codes.grow.packages.graylog
Class GelfTcpTransport.Builder
java.lang.Object
codes.grow.packages.graylog.GelfTcpTransport.Builder
- Enclosing class:
GelfTcpTransport
Builder of a
GelfTcpTransport.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validates and builds the transport; the connection opens on first use.Sets the connect timeout (default 10 s).port(int port) Sets the port (default 12201).retry(RetryPolicy retry) Sets the reconnect policy (defaultRetryPolicy.defaults()).serverName(String serverName) Overrides the SNI / verification host name (default: the host).tls(boolean tls) Enables TLS (the input needstls_enable).tlsOptions(TlsOptions options) Sets the TLS options (CA bundle, client certificate,insecureSkipVerify).Sets the write timeout of one batch (default 30 s).
-
Method Details
-
port
Sets the port (default 12201).- Parameters:
port- 1..65535- Returns:
- this builder
-
tls
Enables TLS (the input needstls_enable).- Parameters:
tls- true to enable- Returns:
- this builder
-
tlsOptions
Sets the TLS options (CA bundle, client certificate,insecureSkipVerify).- Parameters:
options- TLS options- Returns:
- this builder
-
serverName
Overrides the SNI / verification host name (default: the host).- Parameters:
serverName- name- Returns:
- this builder
-
connectTimeout
Sets the connect timeout (default 10 s).- Parameters:
d- positive duration- Returns:
- this builder
-
writeTimeout
Sets the write timeout of one batch (default 30 s).- Parameters:
d- positive duration- Returns:
- this builder
-
retry
Sets the reconnect policy (defaultRetryPolicy.defaults()).- Parameters:
retry- policy- Returns:
- this builder
-
build
Validates and builds the transport; the connection opens on first use.- Returns:
- the transport
- Throws:
ConfigException- for a blank host, a bad port, timeouts or TLS settings
-