|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.productivity.java.syslog4j.impl.message.AbstractSyslogMessage org.productivity.java.syslog4j.impl.message.structured.StructuredSyslogMessage
public class StructuredSyslogMessage
SyslogStructuredMessage extends AbstractSyslogMessage's ability to provide support for turning POJO (Plain Ol' Java Objects) into Syslog messages. It adds support for structured syslog messages as specified by draft-ietf-syslog-protocol-23. More information here:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
Syslog4j is licensed under the Lesser GNU Public License v2.1. A copy of the LGPL license is available in the META-INF folder in all distributions of Syslog4j and in the base directory of the "doc" ZIP.
Field Summary |
---|
Fields inherited from class org.productivity.java.syslog4j.impl.message.AbstractSyslogMessage |
---|
DEFAULT_DATE_FORMAT, DEFAULT_DELIMITER, DEFAULT_REPLACE_DELIMITER, DEFAULT_TIME_FORMAT, UNDEFINED |
Constructor Summary | |
---|---|
StructuredSyslogMessage(java.lang.String messageId,
java.util.Map structuredData,
java.lang.String message)
Constructs the StructuredSyslogMessage using MSGID,
STRUCTURED-DATA and MSG fields, as described in: |
Method Summary | |
---|---|
static boolean |
checkIsPrintable(java.lang.String value)
|
java.lang.String |
createMessage()
|
boolean |
equals(java.lang.Object obj)
|
static StructuredSyslogMessage |
fromString(java.lang.String syslogMessageStr)
Parses and loads a StructuredSyslogMessage from string. |
java.lang.String |
getMessage()
Returns the MSG field of the structured message format, as described in: |
java.lang.String |
getMessageId()
Returns the MSGID field of the structured message format, as described in: |
java.util.Map |
getStructuredData()
Returns the structured data map. |
int |
hashCode()
|
static java.lang.String |
nilProtect(java.lang.String value)
|
static void |
sdEscape(java.lang.StringBuffer sb,
java.lang.String value)
|
java.lang.String |
toString()
|
Methods inherited from class org.productivity.java.syslog4j.impl.message.AbstractSyslogMessage |
---|
generateDate, generateDateAndTime, generateLocalHostName, generateTime, getDateFormat, getDelimiter, getReplaceDelimiter, getTimeFormat, nullOrEmpty, replaceDelimiter |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StructuredSyslogMessage(java.lang.String messageId, java.util.Map structuredData, java.lang.String message)
StructuredSyslogMessage
using MSGID,
STRUCTURED-DATA and MSG fields, as described in:
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
The Map must be a String -> (Map of String -> String), which encompasses the STRUCTURED-DATA field described in above document.
messageId
- structuredData
- message
- Method Detail |
---|
public static StructuredSyslogMessage fromString(java.lang.String syslogMessageStr)
StructuredSyslogMessage
from string.
syslogMessageStr
-
public java.lang.String getMessageId()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public java.util.Map getStructuredData()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public java.lang.String getMessage()
http://tools.ietf.org/html/draft-ietf-syslog-protocol-23#section-6
public java.lang.String createMessage()
createMessage
in interface SyslogMessageIF
createMessage
in class AbstractSyslogMessage
public static void sdEscape(java.lang.StringBuffer sb, java.lang.String value)
public static boolean checkIsPrintable(java.lang.String value)
public static java.lang.String nilProtect(java.lang.String value)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |