public class RancidAdapterConfigFactory extends RancidAdapterConfigManager
RancidAdapterConfigFactory class.
Constructor and Description |
---|
RancidAdapterConfigFactory(long currentVersion,
InputStream reader,
String localServer,
boolean verifyServer)
constructor constructor
|
Modifier and Type | Method and Description |
---|---|
static RancidAdapterConfigFactory |
getInstance()
Return the singleton instance of this factory.
|
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
|
protected void |
saveXml(String xml)
saveXml
|
void |
update()
update
|
getConfiguration, getDelay, getReadLock, getRetries, getSchedules, getType, getWriteLock, hasSchedule, includeURLs, isCurTimeInSchedule, mappings, packages, policies, rebuildPackageIpListMap, reloadXML, useCategories
public RancidAdapterConfigFactory(long currentVersion, InputStream reader, String localServer, boolean verifyServer) throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException, IOException
currentVersion
- a long.reader
- a InputStream
object.localServer
- a String
object.verifyServer
- a boolean.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.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.IOException
- 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 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 RancidAdapterConfigFactory getInstance()
IllegalStateException
- Thrown if the factory has not yet been initialized.protected void saveXml(String xml) throws IOException
saveXml
xml
- a String
object.IOException
- if any.public void update() throws IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
update
IOException
- if any.org.exolab.castor.xml.MarshalException
- if any.org.exolab.castor.xml.ValidationException
- if any.Copyright © 2017. All rights reserved.