org.productivity.java.syslog4j.impl.message
Class AbstractSyslogMessage

java.lang.Object
  extended by org.productivity.java.syslog4j.impl.message.AbstractSyslogMessage
All Implemented Interfaces:
java.io.Serializable, SyslogMessageIF
Direct Known Subclasses:
PCISyslogMessage, StructuredSyslogMessage

public abstract class AbstractSyslogMessage
extends java.lang.Object
implements SyslogMessageIF

AbstractSyslogMessage provides support for turning POJO (Plain Ol' Java Objects) into Syslog messages.

More information on the PCI DSS specification is available here:

https://www.pcisecuritystandards.org/security_standards/pci_dss.shtml

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.

Version:
$Id: AbstractSyslogMessage.java,v 1.2 2009/04/17 02:37:04 cvs Exp $
Author:
<syslog4j@productivity.org>
See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_DATE_FORMAT
           
static char DEFAULT_DELIMITER
           
static java.lang.String DEFAULT_REPLACE_DELIMITER
           
static java.lang.String DEFAULT_TIME_FORMAT
           
static java.lang.String UNDEFINED
           
 
Constructor Summary
AbstractSyslogMessage()
           
 
Method Summary
abstract  java.lang.String createMessage()
           
protected  java.lang.String generateDate()
           
protected  java.lang.String[] generateDateAndTime(java.util.Date date)
           
protected  java.lang.String generateLocalHostName()
           
protected  java.lang.String generateTime()
           
protected  java.lang.String getDateFormat()
           
protected  char getDelimiter()
           
protected  java.lang.String getReplaceDelimiter()
           
protected  java.lang.String getTimeFormat()
           
protected  boolean nullOrEmpty(java.lang.String value)
           
protected  java.lang.String replaceDelimiter(java.lang.String fieldName, java.lang.String fieldValue, char delimiter, java.lang.String replaceDelimiter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static final java.lang.String UNDEFINED
See Also:
Constant Field Values

DEFAULT_DATE_FORMAT

public static final java.lang.String DEFAULT_DATE_FORMAT
See Also:
Constant Field Values

DEFAULT_TIME_FORMAT

public static final java.lang.String DEFAULT_TIME_FORMAT
See Also:
Constant Field Values

DEFAULT_DELIMITER

public static final char DEFAULT_DELIMITER
See Also:
Constant Field Values

DEFAULT_REPLACE_DELIMITER

public static final java.lang.String DEFAULT_REPLACE_DELIMITER
See Also:
Constant Field Values
Constructor Detail

AbstractSyslogMessage

public AbstractSyslogMessage()
Method Detail

getDelimiter

protected char getDelimiter()

getReplaceDelimiter

protected java.lang.String getReplaceDelimiter()

getDateFormat

protected java.lang.String getDateFormat()

getTimeFormat

protected java.lang.String getTimeFormat()

generateDate

protected java.lang.String generateDate()

generateTime

protected java.lang.String generateTime()

generateDateAndTime

protected java.lang.String[] generateDateAndTime(java.util.Date date)

generateLocalHostName

protected java.lang.String generateLocalHostName()

nullOrEmpty

protected boolean nullOrEmpty(java.lang.String value)

replaceDelimiter

protected java.lang.String replaceDelimiter(java.lang.String fieldName,
                                            java.lang.String fieldValue,
                                            char delimiter,
                                            java.lang.String replaceDelimiter)

createMessage

public abstract java.lang.String createMessage()
Specified by:
createMessage in interface SyslogMessageIF