org.productivity.java.syslog4j.impl.multiple
Class MultipleSyslogConfig

java.lang.Object
  extended by org.productivity.java.syslog4j.impl.multiple.MultipleSyslogConfig
All Implemented Interfaces:
java.io.Serializable, SyslogCharSetIF, SyslogConfigIF, SyslogConstants

public class MultipleSyslogConfig
extends java.lang.Object
implements SyslogConfigIF

MultipleSyslogConfig is a configuration Object for allowing a single Syslog call to send to multiple Syslog implementations.

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: MultipleSyslogConfig.java,v 1.8 2010/11/28 04:15:18 cvs Exp $
Author:
<syslog4j@productivity.org>
See Also:
Serialized Form

Field Summary
protected  java.util.List syslogProtocols
           
 
Fields inherited from interface org.productivity.java.syslog4j.SyslogConstants
AF_UNIX, CACHE_HOST_ADDRESS_DEFAULT, CHAR_SET_DEFAULT, CRLF, FACILITY_AUTH, FACILITY_AUTHPRIV, FACILITY_CRON, FACILITY_DAEMON, FACILITY_FTP, FACILITY_KERN, FACILITY_LOCAL0, FACILITY_LOCAL1, FACILITY_LOCAL2, FACILITY_LOCAL3, FACILITY_LOCAL4, FACILITY_LOCAL5, FACILITY_LOCAL6, FACILITY_LOCAL7, FACILITY_LPR, FACILITY_MAIL, FACILITY_NEWS, FACILITY_SYSLOG, FACILITY_USER, FACILITY_UUCP, IDENT_SUFFIX_DEFAULT, INCLUDE_IDENT_IN_MESSAGE_MODIFIER_DEFAULT, JNA_NATIVE_CLASS, LEVEL_ALERT, LEVEL_CRITICAL, LEVEL_DEBUG, LEVEL_EMERGENCY, LEVEL_ERROR, LEVEL_INFO, LEVEL_NOTICE, LEVEL_WARN, LF, MAX_MESSAGE_LENGTH_DEFAULT, MAX_QUEUE_SIZE_DEFAULT, MAX_SHUTDOWN_WAIT_DEFAULT, OPTION_LOG_CONS, OPTION_LOG_NDELAY, OPTION_LOG_NOWAIT, OPTION_LOG_ODELAY, OPTION_LOG_PERROR, OPTION_LOG_PID, OPTION_NONE, SEND_LOCAL_NAME_DEFAULT, SEND_LOCAL_NAME_DEFAULT_VALUE, SEND_LOCAL_TIMESTAMP_DEFAULT, SERVER_SHUTDOWN_WAIT_DEFAULT, SERVER_SOCKET_BACKLOG_DEFAULT, SHUTDOWN_INTERVAL, SOCK_DGRAM, SOCK_STREAM, SPLIT_MESSAGE_BEGIN_TEXT_DEFAULT, SPLIT_MESSAGE_END_TEXT_DEFAULT, STRUCTURED_DATA_APP_NAME_DEFAULT_VALUE, STRUCTURED_DATA_EMPTY_VALUE, STRUCTURED_DATA_NILVALUE, STRUCTURED_DATA_PROCESS_ID_DEFAULT_VALUE, SYSLOG_BUFFER_SIZE, SYSLOG_DATEFORMAT, SYSLOG_FACILITY_DEFAULT, SYSLOG_HOST_DEFAULT, SYSLOG_LIBRARY_DEFAULT, SYSLOG_MESSAGE_MODIFIER_PREFIX_DEFAULT, SYSLOG_MESSAGE_MODIFIER_SUFFIX_DEFAULT, SYSLOG_PATH_DEFAULT, SYSLOG_POOL_CONFIG_MAX_ACTIVE_DEFAULT, SYSLOG_POOL_CONFIG_MAX_IDLE_DEFAULT, SYSLOG_POOL_CONFIG_MAX_WAIT_DEFAULT, SYSLOG_POOL_CONFIG_MIN_EVICTABLE_IDLE_TIME_MILLIS_DEFAULT, SYSLOG_POOL_CONFIG_MIN_IDLE_DEFAULT, SYSLOG_POOL_CONFIG_NUM_TESTS_PER_EVICTION_RUN_DEFAULT, SYSLOG_POOL_CONFIG_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS_DEFAULT, SYSLOG_POOL_CONFIG_TEST_ON_BORROW_DEFAULT, SYSLOG_POOL_CONFIG_TEST_ON_RETURN_DEFAULT, SYSLOG_POOL_CONFIG_TEST_WHILE_IDLE_DEFAULT, SYSLOG_POOL_CONFIG_TIME_BETWEEN_EVICTION_RUNS_MILLIS_DEFAULT, SYSLOG_PORT_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_FIRST_NUMBER_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_LAST_NUMBER_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_PAD_CHAR_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_PREFIX_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_SUFFIX_DEFAULT, SYSLOG_SEQUENTIAL_MESSAGE_MODIFIER_USE_PADDING_DEFAULT, SYSLOG_SOCKET_FAMILY_DEFAULT, SYSLOG_SOCKET_LIBRARY_DEFAULT, SYSLOG_SOCKET_PATH_DEFAULT, SYSLOG_SOCKET_PROTOCOL_DEFAULT, SYSLOG_SOCKET_TYPE_DEFAULT, TCP, TCP_DELIMITER_SEQUENCE_DEFAULT, TCP_FRESH_CONNECTION_INTERVAL_DEFAULT, TCP_KEEP_ALIVE_DEFAULT, TCP_MAX_ACTIVE_SOCKETS_BEHAVIOR_DEFAULT, TCP_MAX_ACTIVE_SOCKETS_DEFAULT, TCP_PERSISTENT_CONNECTION_DEFAULT, TCP_REUSE_ADDRESS_DEFAULT, TCP_SET_BUFFER_SIZE_DEFAULT, TCP_SO_LINGER_DEFAULT, TCP_SO_LINGER_SECONDS_DEFAULT, THREAD_LOOP_INTERVAL_DEFAULT, THREAD_PRIORITY_DEFAULT, THREADED_DEFAULT, THROW_EXCEPTION_ON_INITIALIZE_DEFAULT, THROW_EXCEPTION_ON_WRITE_DEFAULT, TRUNCATE_MESSAGE_DEFAULT, UDP, UNIX_SOCKET, UNIX_SYSLOG, USE_DAEMON_THREAD_DEFAULT, USE_STRUCTURED_DATA_DEFAULT, WRITE_RETRIES_DEFAULT
 
Constructor Summary
MultipleSyslogConfig()
           
MultipleSyslogConfig(java.util.List protocols)
           
MultipleSyslogConfig(java.lang.String[] protocols)
           
 
Method Summary
 void addBackLogHandler(SyslogBackLogHandlerIF backLogHandler)
           
 void addMessageModifier(SyslogMessageModifierIF messageModifier)
           
 void addProtocol(java.lang.String protocol)
           
 java.lang.String getCharSet()
           
 int getFacility()
           
 java.lang.String getHost()
           
 java.lang.String getIdent()
           
 java.lang.String getLocalName()
           
 int getMaxMessageLength()
           
 int getMaxShutdownWait()
           
 int getPort()
           
 java.util.List getProtocols()
           
 java.lang.Class getSyslogClass()
           
 void insertBackLogHandler(int index, SyslogBackLogHandlerIF backLogHandler)
           
 void insertMessageModifier(int index, SyslogMessageModifierIF messageModifier)
           
 void insertProtocol(int index, java.lang.String protocol)
           
 boolean isCacheHostAddress()
           
 boolean isIncludeIdentInMessageModifier()
           
 boolean isSendLocalName()
           
 boolean isSendLocalTimestamp()
           
 boolean isThrowExceptionOnInitialize()
           
 boolean isThrowExceptionOnWrite()
           
 boolean isTruncateMessage()
           
 boolean isUseStructuredData()
           
 void removeAllBackLogHandlers()
           
 void removeAllMessageModifiers()
           
 void removeAllProtocols()
           
 void removeBackLogHandler(SyslogBackLogHandlerIF backLogHandler)
           
 void removeMessageModifier(SyslogMessageModifierIF messageModifier)
           
 void removeProtocol(java.lang.String protocol)
           
 void setCacheHostAddress(boolean cacheHostAddress)
           
 void setCharSet(java.lang.String charSet)
           
 void setFacility(int facility)
           
 void setFacility(java.lang.String facilityName)
           
 void setHost(java.lang.String host)
           
 void setIdent(java.lang.String ident)
           
 void setIncludeIdentInMessageModifier(boolean throwExceptionOnInitialize)
           
 void setLocalName(java.lang.String localName)
           
 void setMaxMessageLength(int maxMessageLength)
           
 void setMaxShutdownWait(int maxShutdownWait)
           
 void setPort(int port)
           
 void setSendLocalName(boolean sendLocalName)
           
 void setSendLocalTimestamp(boolean sendLocalTimestamp)
           
 void setThrowExceptionOnInitialize(boolean throwExceptionOnInitialize)
           
 void setThrowExceptionOnWrite(boolean throwExceptionOnWrite)
           
 void setTruncateMessage(boolean truncateMessage)
           
 void setUseStructuredData(boolean useStructuredData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

syslogProtocols

protected java.util.List syslogProtocols
Constructor Detail

MultipleSyslogConfig

public MultipleSyslogConfig()

MultipleSyslogConfig

public MultipleSyslogConfig(java.util.List protocols)

MultipleSyslogConfig

public MultipleSyslogConfig(java.lang.String[] protocols)
Method Detail

getProtocols

public java.util.List getProtocols()

addProtocol

public void addProtocol(java.lang.String protocol)

insertProtocol

public void insertProtocol(int index,
                           java.lang.String protocol)

removeProtocol

public void removeProtocol(java.lang.String protocol)

removeAllProtocols

public void removeAllProtocols()

addBackLogHandler

public void addBackLogHandler(SyslogBackLogHandlerIF backLogHandler)
Specified by:
addBackLogHandler in interface SyslogConfigIF

addMessageModifier

public void addMessageModifier(SyslogMessageModifierIF messageModifier)
Specified by:
addMessageModifier in interface SyslogConfigIF

getSyslogClass

public java.lang.Class getSyslogClass()
Specified by:
getSyslogClass in interface SyslogConfigIF

getCharSet

public java.lang.String getCharSet()
Specified by:
getCharSet in interface SyslogCharSetIF
Specified by:
getCharSet in interface SyslogConfigIF

getFacility

public int getFacility()
Specified by:
getFacility in interface SyslogConfigIF

getHost

public java.lang.String getHost()
Specified by:
getHost in interface SyslogConfigIF

getIdent

public java.lang.String getIdent()
Specified by:
getIdent in interface SyslogConfigIF

getLocalName

public java.lang.String getLocalName()
Specified by:
getLocalName in interface SyslogConfigIF

getPort

public int getPort()
Specified by:
getPort in interface SyslogConfigIF

getMaxShutdownWait

public int getMaxShutdownWait()

setMaxShutdownWait

public void setMaxShutdownWait(int maxShutdownWait)

insertBackLogHandler

public void insertBackLogHandler(int index,
                                 SyslogBackLogHandlerIF backLogHandler)
Specified by:
insertBackLogHandler in interface SyslogConfigIF

insertMessageModifier

public void insertMessageModifier(int index,
                                  SyslogMessageModifierIF messageModifier)
Specified by:
insertMessageModifier in interface SyslogConfigIF

isCacheHostAddress

public boolean isCacheHostAddress()

isIncludeIdentInMessageModifier

public boolean isIncludeIdentInMessageModifier()
Specified by:
isIncludeIdentInMessageModifier in interface SyslogConfigIF

isSendLocalName

public boolean isSendLocalName()
Specified by:
isSendLocalName in interface SyslogConfigIF

isSendLocalTimestamp

public boolean isSendLocalTimestamp()
Specified by:
isSendLocalTimestamp in interface SyslogConfigIF

isThrowExceptionOnInitialize

public boolean isThrowExceptionOnInitialize()
Specified by:
isThrowExceptionOnInitialize in interface SyslogConfigIF

isThrowExceptionOnWrite

public boolean isThrowExceptionOnWrite()
Specified by:
isThrowExceptionOnWrite in interface SyslogConfigIF

removeAllBackLogHandlers

public void removeAllBackLogHandlers()
Specified by:
removeAllBackLogHandlers in interface SyslogConfigIF

removeAllMessageModifiers

public void removeAllMessageModifiers()
Specified by:
removeAllMessageModifiers in interface SyslogConfigIF

removeBackLogHandler

public void removeBackLogHandler(SyslogBackLogHandlerIF backLogHandler)
Specified by:
removeBackLogHandler in interface SyslogConfigIF

removeMessageModifier

public void removeMessageModifier(SyslogMessageModifierIF messageModifier)
Specified by:
removeMessageModifier in interface SyslogConfigIF

setCacheHostAddress

public void setCacheHostAddress(boolean cacheHostAddress)

setCharSet

public void setCharSet(java.lang.String charSet)
Specified by:
setCharSet in interface SyslogCharSetIF
Specified by:
setCharSet in interface SyslogConfigIF

setFacility

public void setFacility(int facility)
Specified by:
setFacility in interface SyslogConfigIF

setFacility

public void setFacility(java.lang.String facilityName)
Specified by:
setFacility in interface SyslogConfigIF

setHost

public void setHost(java.lang.String host)
             throws SyslogRuntimeException
Specified by:
setHost in interface SyslogConfigIF
Throws:
SyslogRuntimeException

setIdent

public void setIdent(java.lang.String ident)
Specified by:
setIdent in interface SyslogConfigIF

setLocalName

public void setLocalName(java.lang.String localName)
Specified by:
setLocalName in interface SyslogConfigIF

setIncludeIdentInMessageModifier

public void setIncludeIdentInMessageModifier(boolean throwExceptionOnInitialize)
Specified by:
setIncludeIdentInMessageModifier in interface SyslogConfigIF

setPort

public void setPort(int port)
             throws SyslogRuntimeException
Specified by:
setPort in interface SyslogConfigIF
Throws:
SyslogRuntimeException

setSendLocalName

public void setSendLocalName(boolean sendLocalName)
Specified by:
setSendLocalName in interface SyslogConfigIF

setSendLocalTimestamp

public void setSendLocalTimestamp(boolean sendLocalTimestamp)
Specified by:
setSendLocalTimestamp in interface SyslogConfigIF

setThrowExceptionOnInitialize

public void setThrowExceptionOnInitialize(boolean throwExceptionOnInitialize)
Specified by:
setThrowExceptionOnInitialize in interface SyslogConfigIF

setThrowExceptionOnWrite

public void setThrowExceptionOnWrite(boolean throwExceptionOnWrite)
Specified by:
setThrowExceptionOnWrite in interface SyslogConfigIF

getMaxMessageLength

public int getMaxMessageLength()
Specified by:
getMaxMessageLength in interface SyslogConfigIF

setMaxMessageLength

public void setMaxMessageLength(int maxMessageLength)
Specified by:
setMaxMessageLength in interface SyslogConfigIF

isTruncateMessage

public boolean isTruncateMessage()
Specified by:
isTruncateMessage in interface SyslogConfigIF

setTruncateMessage

public void setTruncateMessage(boolean truncateMessage)
Specified by:
setTruncateMessage in interface SyslogConfigIF

isUseStructuredData

public boolean isUseStructuredData()
Specified by:
isUseStructuredData in interface SyslogConfigIF

setUseStructuredData

public void setUseStructuredData(boolean useStructuredData)
Specified by:
setUseStructuredData in interface SyslogConfigIF