Class GelfUdpTransport.Builder

java.lang.Object
codes.grow.packages.graylog.GelfUdpTransport.Builder
Enclosing class:
GelfUdpTransport

public static final class GelfUdpTransport.Builder extends Object
Builder of a GelfUdpTransport.
  • Method Details

    • port

      public GelfUdpTransport.Builder port(int port)
      Sets the port (default 12201).
      Parameters:
      port - 1..65535
      Returns:
      this builder
    • compression

      public GelfUdpTransport.Builder compression(GelfCompression compression)
      Sets the compression (default gzip).
      Parameters:
      compression - compression
      Returns:
      this builder
    • chunkSize

      public GelfUdpTransport.Builder chunkSize(int chunkSize)
      Sets the datagram size including the 12-byte chunk header (default 1420).
      Parameters:
      chunkSize - 64..65507
      Returns:
      this builder
    • build

      public GelfUdpTransport build()
      Validates and builds the transport; the socket opens on first use.
      Returns:
      the transport
      Throws:
      ConfigException - for a blank host, a bad port or chunk size