|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.SyslogdConfigFactory
public final class SyslogdConfigFactory
This is the singleton class used to load the configuration for the OpenNMS Syslogd from syslogd-configuration.xml. Note: Users of this class should make sure the init() is called before calling any other method to ensure the config is loaded before accessing other convenience methods.
| Constructor Summary | |
|---|---|
SyslogdConfigFactory(Reader rdr)
|
|
| Method Summary | |
|---|---|
String |
getDiscardUei()
|
String |
getForwardingRegexp()
|
HideMessage |
getHideMessages()
|
static SyslogdConfig |
getInstance()
Return the singleton instance of this factory. |
int |
getMatchingGroupHost()
|
int |
getMatchingGroupMessage()
|
boolean |
getNewSuspectOnMessage()
Return whether or not a newSuspect event should be sent when a trap is received from an unknown IP address. |
int |
getSyslogPort()
Return the port on which SNMP traps should be received. |
UeiList |
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SyslogdConfigFactory(Reader rdr)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException| Method Detail |
|---|
public static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified config file cannot be read
org.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/loaded
org.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)
public int getSyslogPort()
getSyslogPort in interface SyslogdConfigpublic boolean getNewSuspectOnMessage()
getNewSuspectOnMessage in interface SyslogdConfigpublic String getForwardingRegexp()
getForwardingRegexp in interface SyslogdConfigpublic int getMatchingGroupHost()
getMatchingGroupHost in interface SyslogdConfigpublic int getMatchingGroupMessage()
getMatchingGroupMessage in interface SyslogdConfigpublic UeiList getUeiList()
getUeiList in interface SyslogdConfigpublic HideMessage getHideMessages()
getHideMessages in interface SyslogdConfigpublic String getDiscardUei()
getDiscardUei in interface SyslogdConfig
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||