|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.XmlrpcdConfigFactory
public final class XmlrpcdConfigFactory
This is the singleton class used to load the configuration for the OpenNMS xmlrpcd service from the xmlrpcd-configuration xml file. 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 | |
|---|---|
XmlrpcdConfigFactory(Reader rdr)
Constructor for testing |
|
| Method Summary | |
|---|---|
XmlrpcdConfiguration |
getConfiguration()
Return the xmlrpcd configuration object. |
List<SubscribedEvent> |
getEventList(ExternalServers server)
Retrieves configured list of subscribed event uei for the given subscribing server. |
Collection<ExternalServers> |
getExternalServerCollection()
Retrieves configured list of xmlrpc servers and the events to which they subscribe. |
Enumeration<ExternalServers> |
getExternalServerEnumeration()
Retrieves configured list of xmlrpc servers and the events to which they subscribe. |
static XmlrpcdConfigFactory |
getInstance()
Return the singleton instance of this factory. |
int |
getMaxQueueSize()
Retrieves the max event queue size from configuration. |
Collection<Subscription> |
getSubscriptionCollection()
Retrieves configured list of server subscriptions and the UEIs they are associated with. |
Enumeration<Subscription> |
getSubscriptionEnumeration()
Retrieves configured list of server subscriptions and the UEIs they are associated with. |
static void |
init()
Load the config from the default config file and create the singleton instance of this factory. |
static void |
init(File cfgFile)
Load the specified config file and create the singleton instance of this factory. |
static void |
reload()
Reload the config from the default config file |
static void |
setInstance(XmlrpcdConfigFactory instance)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlrpcdConfigFactory(Reader rdr)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException - Thrown if the specified reader 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.| 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 init(File cfgFile)
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 XmlrpcdConfigFactory getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(XmlrpcdConfigFactory instance)
public XmlrpcdConfiguration getConfiguration()
public List<SubscribedEvent> getEventList(ExternalServers server)
throws org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.ValidationException - if a serverSubscription
element references a subscription name that doesn't existpublic Enumeration<ExternalServers> getExternalServerEnumeration()
public Enumeration<Subscription> getSubscriptionEnumeration()
public Collection<ExternalServers> getExternalServerCollection()
public Collection<Subscription> getSubscriptionCollection()
public int getMaxQueueSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||