public final class EventTranslatorConfigFactory extends Object implements EventTranslatorConfig
TRANSLATOR_NAME| Constructor and Description |
|---|
EventTranslatorConfigFactory(InputStream rdr,
DataSource dbConnFactory)
Constructor for EventTranslatorConfigFactory.
|
| Modifier and Type | Method and Description |
|---|---|
static Event |
cloneEvent(Event orig)
cloneEvent
|
static EventTranslatorConfig |
getInstance()
Return the singleton instance of this factory.
|
List<String> |
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(EventTranslatorConfig singleton)
setInstance
|
List<Event> |
translateEvent(Event e)
Translate the @param e to a new event
|
void |
update()
Simply marshals the config without messing with the singletons.
|
public EventTranslatorConfigFactory(InputStream rdr, DataSource dbConnFactory) throws IOException
Constructor for EventTranslatorConfigFactory.
rdr - a Reader object.dbConnFactory - a DataSource object.IOExceptionpublic void update()
throws Exception
update in interface EventTranslatorConfigException - if any.public static void init()
throws IOException,
ClassNotFoundException,
SQLException,
PropertyVetoException
IOException - Thrown if the specified config file cannot be readClassNotFoundException - if any.IOException - if any.SQLException - if any.PropertyVetoException - if any.public static void reload()
throws IOException,
ClassNotFoundException,
SQLException,
PropertyVetoException
IOException - Thrown if the specified config file cannot be read/loadedClassNotFoundException - if any.IOException - if any.SQLException - if any.PropertyVetoException - if any.public static EventTranslatorConfig getInstance()
IllegalStateException - Thrown if the factory has not yet been initialized.public static void setInstance(EventTranslatorConfig singleton)
setInstance
singleton - a EventTranslatorConfig object.public List<String> getUEIList()
getUEIList
getUEIList in interface EventTranslatorConfigList object.public List<Event> translateEvent(Event e)
translateEvent in interface EventTranslatorConfige - EventCopyright © 2022. All rights reserved.