public final class XmlrpcdConfigFactory extends Object
Constructor and Description |
---|
XmlrpcdConfigFactory(InputStream stream)
Constructor for XmlrpcdConfigFactory.
|
XmlrpcdConfigFactory(Reader rdr)
Constructor for testing
|
Modifier and Type | Method and Description |
---|---|
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)
setInstance
|
public XmlrpcdConfigFactory(Reader rdr) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
rdr
- a Reader
object.IOException
- Thrown if the specified reader 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.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public XmlrpcdConfigFactory(InputStream stream) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
Constructor for XmlrpcdConfigFactory.
stream
- a InputStream
object.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.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 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.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public static void init(File cfgFile) throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
cfgFile
- a File
object.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.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.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.IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.public static XmlrpcdConfigFactory getInstance()
IllegalStateException
- Thrown if the factory has not yet been initialized.public static void setInstance(XmlrpcdConfigFactory instance)
setInstance
instance
- a XmlrpcdConfigFactory
object.public XmlrpcdConfiguration getConfiguration()
XmlrpcdConfiguration
object.public List<SubscribedEvent> getEventList(ExternalServers server) throws org.exolab.castor.xml.ValidationException
server
- a ExternalServers
object.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()
Copyright © 2015. All rights reserved.