Class SyslogUdpPublisher
- java.lang.Object
-
- org.forgerock.openam.log.handlers.syslog.SyslogPublisher
-
- org.forgerock.openam.log.handlers.syslog.SyslogUdpPublisher
-
public class SyslogUdpPublisher extends SyslogPublisher
ASyslogPublisherimplementation that publishes the audit log records via UDP packets.
-
-
Field Summary
-
Fields inherited from class org.forgerock.openam.log.handlers.syslog.SyslogPublisher
socketAddress
-
-
Constructor Summary
Constructors Constructor Description SyslogUdpPublisher(InetSocketAddress socketAddress)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseConnection()Closes the underlying connection.protected voidreconnect()Checks if the currently opened connection is still valid, and connects/reconnects to the Syslog server if necessary.protected voidsendLogRecord(byte[] bytes)Sends the log record to the syslog server by the means of the chosen protocol (TCP or UDP).-
Methods inherited from class org.forgerock.openam.log.handlers.syslog.SyslogPublisher
publishLogRecords
-
-
-
-
Constructor Detail
-
SyslogUdpPublisher
public SyslogUdpPublisher(InetSocketAddress socketAddress)
-
-
Method Detail
-
reconnect
protected void reconnect() throws IOExceptionDescription copied from class:SyslogPublisherChecks if the currently opened connection is still valid, and connects/reconnects to the Syslog server if necessary.- Specified by:
reconnectin classSyslogPublisher- Throws:
IOException- If there was an IO error while trying to connect to the Syslog server.
-
sendLogRecord
protected void sendLogRecord(byte[] bytes) throws IOExceptionDescription copied from class:SyslogPublisherSends the log record to the syslog server by the means of the chosen protocol (TCP or UDP).- Specified by:
sendLogRecordin classSyslogPublisher- Parameters:
bytes- The logRecord's byte[] representation.- Throws:
IOException- If there was an IO error while sending the audit entry to Syslog.
-
closeConnection
protected void closeConnection() throws IOExceptionDescription copied from class:SyslogPublisherCloses the underlying connection.- Specified by:
closeConnectionin classSyslogPublisher- Throws:
IOException- If there was an IO error while closing the connection.
-
-