Package org.wildfly.security.audit
Class SyslogAuditEndpoint.Builder
- java.lang.Object
- 
- org.wildfly.security.audit.SyslogAuditEndpoint.Builder
 
- 
- Enclosing class:
- SyslogAuditEndpoint
 
 public static class SyslogAuditEndpoint.Builder extends Object A builder for syslog audit endpoint.
- 
- 
Field SummaryFields Modifier and Type Field Description private org.jboss.logmanager.handlers.SyslogHandler.SyslogTypeformatprivate StringhostNameprivate intmaxReconnectAttemptsprivate intportprivate InetAddressserverAddressprivate SocketFactorysocketFactoryprivate booleansslprivate booleantcp
 - 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditEndpointbuild()Build a newAuditEndpointconfigured to pass all messages using Syslog.SyslogAuditEndpoint.BuildersetFormat(org.jboss.logmanager.handlers.SyslogHandler.SyslogType format)Sets the SyslogFormat that will be used.SyslogAuditEndpoint.BuildersetHostName(String hostName)Set the host name that should be sent within the syslog messages.SyslogAuditEndpoint.BuildersetMaxReconnectAttempts(int maxReconnectAttempts)Sets the amount of reconnect-attempts that will be used.SyslogAuditEndpoint.BuildersetPort(int port)Set the port the syslog server is listening on.SyslogAuditEndpoint.BuildersetServerAddress(InetAddress serverAddress)Set the server address syslog messages should be sent to.SyslogAuditEndpoint.BuildersetSocketFactory(SocketFactory socketFactory)SetSocketFactoryfor TCP connections - usually to provide configuredSSLSocketFactory.SyslogAuditEndpoint.BuildersetSsl(boolean ssl)Set if the communication should be using SSL.SyslogAuditEndpoint.BuildersetTcp(boolean tcp)Set if the communication should be using TCP.
 
- 
- 
- 
Field Detail- 
serverAddressprivate InetAddress serverAddress 
 - 
portprivate int port 
 - 
sslprivate boolean ssl 
 - 
tcpprivate boolean tcp 
 - 
hostNameprivate String hostName 
 - 
socketFactoryprivate SocketFactory socketFactory 
 - 
formatprivate org.jboss.logmanager.handlers.SyslogHandler.SyslogType format 
 - 
maxReconnectAttemptsprivate int maxReconnectAttempts 
 
- 
 - 
Method Detail- 
setServerAddresspublic 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.
 
 - 
setPortpublic 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.
 
 - 
setTcppublic 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.
 
 - 
setSslpublic 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.
 
 - 
setSocketFactorypublic SyslogAuditEndpoint.Builder setSocketFactory(SocketFactory socketFactory) SetSocketFactoryfor TCP connections - usually to provide configuredSSLSocketFactory.- Parameters:
- socketFactory- the- SocketFactoryor- nullfor default- SocketFactory.
- Returns:
- this builder.
 
 - 
setHostNamepublic 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.
 
 - 
setFormatpublic 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.
 
 - 
setMaxReconnectAttemptspublic 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
 
 - 
buildpublic AuditEndpoint build() throws IOException Build a newAuditEndpointconfigured to pass all messages using Syslog.- Returns:
- a new AuditEndpointconfigured to pass all messages using Syslog.
- Throws:
- IOException- if an error occurs initialising the endpoint.
 
 
- 
 
-