Package org.opennms.netmgt.syslogd
Class SyslogMessage
- java.lang.Object
-
- org.opennms.netmgt.syslogd.SyslogMessage
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SyslogMessage extends java.lang.Object implements java.lang.Cloneable
-
-
Constructor Summary
Constructors Modifier Constructor Description SyslogMessage()
protected
SyslogMessage(SyslogFacility facility, SyslogSeverity severity, java.lang.Integer version, java.util.Date date, java.lang.Integer year, java.lang.Integer month, java.lang.Integer dayOfMonth, java.lang.Integer hourOfDay, java.lang.Integer minute, java.lang.Integer second, java.lang.Integer millisecond, java.time.ZoneId zoneId, java.lang.String hostname, java.lang.String processName, java.lang.String processId, java.lang.String messageId, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> parameters)
Copy constructor used byclone()
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(java.lang.String key, java.lang.String value)
java.lang.String
asRfc3164Message()
SyslogMessage
clone()
java.util.Date
getDate()
java.lang.Integer
getDayOfMonth()
SyslogFacility
getFacility()
java.net.InetAddress
getHostAddress()
java.lang.String
getHostName()
java.lang.Integer
getHourOfDay()
java.lang.String
getMessage()
java.lang.String
getMessageID()
java.lang.Integer
getMillisecond()
java.lang.Integer
getMinute()
java.lang.Integer
getMonth()
java.util.Map<java.lang.String,java.lang.String>
getParameters()
java.lang.Class<? extends SyslogParser>
getParserClass()
java.lang.String
getProcessId()
java.lang.String
getProcessName()
java.lang.String
getRfc3164FormattedDate()
static java.lang.String
getRfc3164FormattedDate(java.util.Date date)
java.lang.String
getRfc3339FormattedDate()
java.lang.Integer
getSecond()
SyslogSeverity
getSeverity()
java.lang.Integer
getVersion()
java.lang.Integer
getYear()
java.time.ZoneId
getZoneId()
void
setDate(java.util.Date date)
void
setDayOfMonth(java.lang.Integer dayOfMonth)
void
setFacility(SyslogFacility facility)
void
setHostName(java.lang.String hostname)
void
setHourOfDay(java.lang.Integer hourOfDay)
void
setMessage(java.lang.String message)
void
setMessageID(java.lang.String messageId)
void
setMillisecond(java.lang.Integer millisecond)
void
setMinute(java.lang.Integer minute)
void
setMonth(java.lang.Integer month)
void
setParam(java.lang.String key, java.lang.Integer value)
void
setParam(java.lang.String key, java.lang.String value)
void
setParserClass(java.lang.Class<? extends SyslogParser> parser)
void
setProcessId(java.lang.String processId)
void
setProcessName(java.lang.String processName)
void
setSecond(java.lang.Integer second)
void
setSeverity(SyslogSeverity severity)
void
setVersion(java.lang.Integer version)
void
setYear(java.lang.Integer year)
void
setZoneId(java.time.ZoneId zoneId)
java.lang.String
toString()
-
-
-
Constructor Detail
-
SyslogMessage
public SyslogMessage()
-
SyslogMessage
protected SyslogMessage(SyslogFacility facility, SyslogSeverity severity, java.lang.Integer version, java.util.Date date, java.lang.Integer year, java.lang.Integer month, java.lang.Integer dayOfMonth, java.lang.Integer hourOfDay, java.lang.Integer minute, java.lang.Integer second, java.lang.Integer millisecond, java.time.ZoneId zoneId, java.lang.String hostname, java.lang.String processName, java.lang.String processId, java.lang.String messageId, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> parameters)
Copy constructor used byclone()
.- Parameters:
facility
-severity
-version
-date
-year
-month
-dayOfMonth
-hourOfDay
-minute
-second
-millisecond
-zoneId
-hostname
-processName
-processId
-messageId
-message
-parameters
-
-
-
Method Detail
-
getParserClass
public java.lang.Class<? extends SyslogParser> getParserClass()
-
setParserClass
public void setParserClass(java.lang.Class<? extends SyslogParser> parser)
-
getFacility
public SyslogFacility getFacility()
-
setFacility
public void setFacility(SyslogFacility facility)
-
getSeverity
public SyslogSeverity getSeverity()
-
setSeverity
public void setSeverity(SyslogSeverity severity)
-
getVersion
public java.lang.Integer getVersion()
-
setVersion
public void setVersion(java.lang.Integer version)
-
getDate
public java.util.Date getDate()
-
setDate
public void setDate(java.util.Date date)
-
getYear
public java.lang.Integer getYear()
-
setYear
public void setYear(java.lang.Integer year)
-
getMonth
public java.lang.Integer getMonth()
-
setMonth
public void setMonth(java.lang.Integer month)
-
getDayOfMonth
public java.lang.Integer getDayOfMonth()
-
setDayOfMonth
public void setDayOfMonth(java.lang.Integer dayOfMonth)
-
getHourOfDay
public java.lang.Integer getHourOfDay()
-
setHourOfDay
public void setHourOfDay(java.lang.Integer hourOfDay)
-
getMinute
public java.lang.Integer getMinute()
-
setMinute
public void setMinute(java.lang.Integer minute)
-
getSecond
public java.lang.Integer getSecond()
-
setSecond
public void setSecond(java.lang.Integer second)
-
getMillisecond
public java.lang.Integer getMillisecond()
-
setMillisecond
public void setMillisecond(java.lang.Integer millisecond)
-
getZoneId
public java.time.ZoneId getZoneId()
-
setZoneId
public void setZoneId(java.time.ZoneId zoneId)
-
getHostName
public java.lang.String getHostName()
-
setHostName
public void setHostName(java.lang.String hostname)
-
getHostAddress
public java.net.InetAddress getHostAddress()
-
getProcessName
public java.lang.String getProcessName()
-
setProcessName
public void setProcessName(java.lang.String processName)
-
getProcessId
public java.lang.String getProcessId()
-
setProcessId
public void setProcessId(java.lang.String processId)
-
getMessageID
public java.lang.String getMessageID()
-
setMessageID
public void setMessageID(java.lang.String messageId)
-
getMessage
public java.lang.String getMessage()
-
setMessage
public void setMessage(java.lang.String message)
-
addParameter
public void addParameter(java.lang.String key, java.lang.String value)
-
getParameters
public java.util.Map<java.lang.String,java.lang.String> getParameters()
-
getRfc3164FormattedDate
public java.lang.String getRfc3164FormattedDate()
-
getRfc3164FormattedDate
public static java.lang.String getRfc3164FormattedDate(java.util.Date date)
-
getRfc3339FormattedDate
public java.lang.String getRfc3339FormattedDate()
-
asRfc3164Message
public java.lang.String asRfc3164Message()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setParam
public void setParam(java.lang.String key, java.lang.String value)
-
setParam
public void setParam(java.lang.String key, java.lang.Integer value)
-
clone
public SyslogMessage clone()
- Overrides:
clone
in classjava.lang.Object
-
-