Class SyslogAuditEndpoint.Builder

  • Enclosing class:
    SyslogAuditEndpoint

    public static class SyslogAuditEndpoint.Builder
    extends Object
    A builder for syslog audit endpoint.
    • Field Detail

      • port

        private int port
      • ssl

        private boolean ssl
      • tcp

        private boolean tcp
      • hostName

        private String hostName
      • format

        private org.jboss.logmanager.handlers.SyslogHandler.SyslogType format
      • maxReconnectAttempts

        private int maxReconnectAttempts
    • Constructor Detail

      • Builder

        Builder()
    • Method Detail

      • setServerAddress

        public SyslogAuditEndpoint.Builder setServerAddress​(InetAddress serverAddress)
        Set the server address syslog messages should be sent to.
        Parameters:
        serverAddress - the server address syslog messages should be sent to.
        Returns:
        this builder.
      • setPort

        public SyslogAuditEndpoint.Builder setPort​(int port)
        Set the port the syslog server is listening on.
        Parameters:
        port - the port the syslog server is listening on.
        Returns:
        this builder.
      • setTcp

        public SyslogAuditEndpoint.Builder setTcp​(boolean tcp)
        Set if the communication should be using TCP.
        Parameters:
        tcp - if the communication should be using TCP.
        Returns:
        this builder.
      • setSsl

        public SyslogAuditEndpoint.Builder setSsl​(boolean ssl)
        Set if the communication should be using SSL.
        Parameters:
        ssl - if the communication should be using SSL.
        Returns:
        this builder.
      • setHostName

        public SyslogAuditEndpoint.Builder setHostName​(String hostName)
        Set the host name that should be sent within the syslog messages.
        Parameters:
        hostName - the host name that should be sent within the syslog messages.
        Returns:
        this builder.
      • setFormat

        public SyslogAuditEndpoint.Builder setFormat​(org.jboss.logmanager.handlers.SyslogHandler.SyslogType format)
        Sets the SyslogFormat that will be used.
        Parameters:
        format - The SyslogFormat that should be used
        Returns:
        this builder.
      • setMaxReconnectAttempts

        public SyslogAuditEndpoint.Builder setMaxReconnectAttempts​(int maxReconnectAttempts)
                                                            throws IllegalArgumentException
        Sets the amount of reconnect-attempts that will be used.
        Parameters:
        maxReconnectAttempts - The maximum number of reconnect-attempts attempts with: -1 meaning indefinite attempts 0 meaning no attempts Any positive integer meaning that number of attempts
        Returns:
        this builder.
        Throws:
        IllegalArgumentException - throws an error in the case of a bad reconnect-attempts value of < -1