public final class SyslogdConfigFactory extends Object implements SyslogdConfig
| Constructor and Description |
|---|
SyslogdConfigFactory(InputStream stream)
Constructor for SyslogdConfigFactory.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDiscardUei()
getDiscardUei
|
String |
getForwardingRegexp()
getForwardingRegexp
|
HideMessage |
getHideMessages()
getHideMessages
|
static SyslogdConfig |
getInstance()
Return the singleton instance of this factory.
|
String |
getListenAddress()
getListenAddress
|
int |
getMatchingGroupHost()
getMatchingGroupHost
|
int |
getMatchingGroupMessage()
getMatchingGroupMessage
|
boolean |
getNewSuspectOnMessage()
Return whether or not a newSuspect event should be sent when a trap is
received from an unknown IP address.
|
String |
getParser()
getParser
|
int |
getSyslogPort()
Return the port on which SNMP traps should be received.
|
UeiList |
getUeiList()
getUeiList
|
static void |
init()
Load the config from the default config file and create the singleton
instance of this factory.
|
static void |
reload()
Reload the config from the default config file
|
static void |
setInstance(SyslogdConfig config)
setInstance
|
public SyslogdConfigFactory(InputStream stream) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
Constructor for SyslogdConfigFactory.
stream - a InputStream object.org.exolab.castor.xml.MarshalException - if any.org.exolab.castor.xml.ValidationException - if any.IOExceptionpublic static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be readorg.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.public static void reload()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be
read/loadedorg.exolab.castor.xml.MarshalException - Thrown if the file does not conform to the schema.org.exolab.castor.xml.ValidationException - Thrown if the contents do not match the required schema.public static SyslogdConfig getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(SyslogdConfig config)
setInstance
config - a SyslogdConfig object.public int getSyslogPort()
getSyslogPort in interface SyslogdConfigpublic String getListenAddress()
getListenAddress
getListenAddress in interface SyslogdConfigString object.public boolean getNewSuspectOnMessage()
getNewSuspectOnMessage in interface SyslogdConfigpublic String getForwardingRegexp()
getForwardingRegexp
getForwardingRegexp in interface SyslogdConfigString object.public int getMatchingGroupHost()
getMatchingGroupHost
getMatchingGroupHost in interface SyslogdConfigpublic int getMatchingGroupMessage()
getMatchingGroupMessage
getMatchingGroupMessage in interface SyslogdConfigpublic String getParser()
getParser
getParser in interface SyslogdConfigpublic UeiList getUeiList()
getUeiList
getUeiList in interface SyslogdConfigUeiList object.public HideMessage getHideMessages()
getHideMessages
getHideMessages in interface SyslogdConfigHideMessage object.public String getDiscardUei()
getDiscardUei
getDiscardUei in interface SyslogdConfigString object.Copyright © 2015. All rights reserved.