|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigInstance
Represents a configuration instance and provides various methods for manipulating the configuration.
Method Summary | |
---|---|
void |
addLogListener(LogListener listener)
Register listener for messages logged by this configuration instance. |
java.lang.String |
getALLastLogFileName(java.lang.String aALName)
Returns the name of the log file created on the last run of a given AssemblyLine. |
java.lang.String |
getALLog(java.lang.String aALName,
java.lang.String aLogFileName)
Given an AssemblyLine name, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file. |
java.lang.String[] |
getALLogFileNames(java.lang.String aALName)
Returns the names of all available log files for a given AssemblyLine. |
java.lang.String |
getALLogLastChunk(java.lang.String aALName,
java.lang.String aLogFileName,
int aKilobytes)
Retrieves the last chunk from a specified AssemblyLine's log file. |
AssemblyLine |
getAssemblyLineByUniqueCode(int alId)
Searches the list of AssemblyLines for the specified unique code (one returned by the getAssemblyLineUniqueCodes() method) |
SchemaConfig |
getAssemblyLineInputParameters(java.lang.String aAssemblyLineName)
Returns the AssemblyLine’s input parameters. |
java.lang.String[] |
getAssemblyLineNames()
Returns the AssemblyLines’ names. |
SchemaConfig |
getAssemblyLineOutputParameters(java.lang.String aAssemblyLineName)
Returns the AssemblyLine’s output parameters. |
AssemblyLine[] |
getAssemblyLines()
Returns currently started AssemblyLines of the configuration instance. |
java.lang.String[] |
getAssemblyLinesNames()
Deprecated. Use getAssemblyLineNames() . |
int[] |
getAssemblyLineUniqueCodes()
Returns a list of integers uniquely identify all the AssemblyLines within the ConfigInstance. |
java.lang.String |
getConfigId()
Returns the configuration ID generated by the server. |
java.lang.String |
getConfigPath()
Retrieves the absolute path of the configuration. |
MetamergeConfig |
getConfiguration()
Returns configuration instance representing this configuration. |
java.lang.String |
getConfigurationFile()
Retrieves a reference to the Configuration file used to load this instance from. |
PoolDefConfig |
getConnectorPoolConfig(java.lang.String aConnectorPoolName)
Returns the Connector Pool configuration object. |
int |
getConnectorPoolFreeNum(java.lang.String aConnectorPoolName)
Returns the number of free Connectors in the specified Connector Pool. |
java.lang.String[] |
getConnectorPoolNames()
Returns the names of all Connector Pools in the Config Instance. |
int |
getConnectorPoolSize(java.lang.String aConnectorPoolName)
Returns the size of the specified Connector Pool. |
ExternalPropertiesConfig |
getExternalProperties()
Deprecated. use getTDIProperties() instead |
ExternalPropertiesConfig |
getExternalProperties(java.lang.String aKey)
Deprecated. use getTDIProperties() instead |
java.lang.String[] |
getExternalPropertiesKeys()
Deprecated. use getTDIProperties() instead |
java.lang.String |
getGlobalUniqueID()
Returns the Config Instance GUID. |
java.util.Date |
getInstanceBootTime()
Returns the Instance boot time. |
java.util.Map<java.lang.String,java.lang.Object> |
getSchedulerInfo(java.lang.String name)
Returns information about the named Scheduler. |
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getSchedulersInfo()
Returns information about all Schedulers in this RS. |
TDIProperties |
getTDIProperties()
Used to obtain a reference to TDIProperties for managing properties / property stores. |
int |
purgeConnectorPool(java.lang.String aConnectorPoolName)
Unused Connectors will be released so that the Pool is shrunk to its minimum size. |
void |
reload()
Reloads the Config Instance with its current configuration. |
void |
removeLogListener(LogListener listener)
Unregister listener for messages logged by this configuration instance. |
void |
saveConfiguration()
Deprecated. Not supported. |
void |
saveConfiguration(boolean aEncrypt)
Deprecated. Not supported. |
void |
saveExternalProperties()
Deprecated. Not supported. |
void |
setConfiguration(MetamergeConfig aConfiguration)
Sets given configuration to this configuration. |
void |
setExternalProperties(ExternalPropertiesConfig aExPropConfig)
Deprecated. Not supported. |
void |
setExternalProperties(java.lang.String aKey,
ExternalPropertiesConfig aExPropConfig)
Deprecated. Not supported. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName)
Starts the specified AssemblyLine asynchronously. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
boolean aSync)
Starts the specified AssemblyLine. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData)
Starts the specified AssemblyLine with the given input data asynchronously. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs)
Starts asynchronously the specified AssemblyLine with the given input data and results listener. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs,
boolean aSync)
Starts the specified AssemblyLine with the given input data and results listener. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs,
boolean aSync,
boolean aGetEntryOnEachCycle)
Starts the specified AssemblyLine with the given input data and results listener. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
boolean aSync)
Starts the specified AssemblyLine with the given input data. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
TaskCallBlock aTcb)
Starts asynchronously the specified AssemblyLine with the given TaskCallBlock. |
AssemblyLine |
startAssemblyLine(java.lang.String aAssemblyLineName,
TaskCallBlock aTcb,
boolean aSync)
Starts the specified AssemblyLine with the given TaskCallBlock. |
AssemblyLineHandler |
startAssemblyLineManual(java.lang.String aAssemblyLineName,
Entry aInputData)
Starts the specified AssemblyLine with the given input data in manual mode. |
Sequence |
startSequence(java.lang.String name)
Starts the specified Sequence. |
Sequence |
startSequence(java.lang.String name,
TaskCallBlock tcb,
AssemblyLineListener listener)
Starts the specified Sequence with the given TaskCallBlock and a Listener |
Sequence |
startSequence(java.lang.String name,
TaskCallBlock tcb,
boolean sync)
Starts the specified Sequence specifying a TaskCallBlock, synchronous or asynchronous. |
void |
stop()
Stops the Config Instance. |
void |
stop(boolean sync)
Stops the Config Instance and all AssemblyLines run by it, and waits a while for the stopping to finish. |
Method Detail |
---|
java.lang.String getConfigId() throws DIException
Example:
for( ci in session.getConfigInstances()){ task.logmsg("Name: " + ci.getConfigId()); } //Sample output: Name: C__Documents and Settings_username_My Documents_TDI_rs.xml
DIException
- if an error occurs while getting the configuration ID.MetamergeConfig getConfiguration() throws DIException
DIException
- if an error occurs while getting the configuration.void setConfiguration(MetamergeConfig aConfiguration) throws DIException
aConfiguration
- The new configuration.
DIException
- if an error occurs while setting the configuration.@Deprecated void saveConfiguration() throws DIException
DIException
@Deprecated void saveConfiguration(boolean aEncrypt) throws DIException
DIException
@Deprecated ExternalPropertiesConfig getExternalProperties() throws DIException
getTDIProperties()
instead
DIException
- if an error occurs while getting the external properties.@Deprecated ExternalPropertiesConfig getExternalProperties(java.lang.String aKey) throws DIException
getTDIProperties()
instead
aKey
- The external property object name.
DIException
- if an error occurs while getting the external properties.@Deprecated java.lang.String[] getExternalPropertiesKeys() throws DIException
getTDIProperties()
instead
DIException
- if an error occurs while getting the external properties
names.@Deprecated void setExternalProperties(ExternalPropertiesConfig aExPropConfig) throws DIException
DIException
@Deprecated void setExternalProperties(java.lang.String aKey, ExternalPropertiesConfig aExPropConfig) throws DIException
DIException
@Deprecated void saveExternalProperties() throws DIException
DIException
@Deprecated java.lang.String[] getAssemblyLinesNames() throws DIException
getAssemblyLineNames()
.
DIException
java.lang.String[] getAssemblyLineNames() throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); for(al in ci.getAssemblyLineNames()){ task.logmsg("Al name: " + al); } //Sample output:Al name: csv2xml Al name: test
DIException
- if an error occurs while getting the AssemblyLines’ names.int[] getAssemblyLineUniqueCodes() throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); for(al in ci.getAssemblyLineUniqueCodes()){ task.logmsg("Al id: " + al); } //Sample output:Al name: csv2xml Al id: 2312
DIException
- if an error occurs while getting the AssemblyLines’ IDs.AssemblyLine getAssemblyLineByUniqueCode(int alId) throws DIException
getAssemblyLineUniqueCodes()
method)
alId
- the AssemblyLine id uniquely identifying the AssemblyLine
instance in the scope of the ConfigInstance.
DIException
- if an error occurs while getting the AssemblyLine.SchemaConfig getAssemblyLineInputParameters(java.lang.String aAssemblyLineName) throws DIException
aAssemblyLineName
- the name of the AssemblyLine.
DIException
- if an error occurs while getting the AssemblyLine's input
parameters.SchemaConfig getAssemblyLineOutputParameters(java.lang.String aAssemblyLineName) throws DIException
aAssemblyLineName
- the name of the AssemblyLine.
DIException
- if an error occurs while getting the AssemblyLine's output
parameters.AssemblyLine[] getAssemblyLines() throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); for(al in ci.getAssemblyLines()){ task.logmsg("Al running: " + al.getName()); } //Sample output: Al running: AssemblyLines/test
DIException
- if an error occurs while getting the AssemblyLines.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var al = ci.startAssemblyLine("csv2xml");//assembly line is started //do something with al
aAssemblyLineName
- The name of the AssemblyLine.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, boolean aSync) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var al = ci.startAssemblyLine("csv2xml", false);//assembly line is started in new thread //do something with al
aAssemblyLineName
- The name of the AssemblyLine.aSync
- when true
the AssemblyLine is started
synchronously, when false
the AssemblyLine is
started asynchronously.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var al = ci.startAssemblyLine("csv2xml", work); //assembly line "csv2xml" is started with the current entry of the current running assembly line //do something with al
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, boolean aSync) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var al = ci.startAssemblyLine("csv2xml", work, false); //assembly line "csv2xml" is started with the current entry of the current running assembly line //do something with al
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.aSync
- when true
the AssemblyLine is started
synchronously, when false
the AssemblyLine is
started asynchronously.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.aListener
- A listener for Entries produced by the AssemblyLine.aGetLogs
- when true
the AssemblyLineListener is delivered
log messages, when false
log messages are not
delivered.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs, boolean aSync) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.aListener
- A listener for Entries produced by the AssemblyLine.aGetLogs
- when true
the AssemblyLineListener delivers log
messages, when false
log messages are not
delivered.aSync
- when true
the AssemblyLine is started
synchronously, when false
the AssemblyLine is
started asynchronously.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs, boolean aSync, boolean aGetEntryOnEachCycle) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.aListener
- A listener for Entries produced by the AssemblyLine.aGetLogs
- when true
the AssemblyLineListener delivers log
messages, when false
log messages are not
delivered.aSync
- when true
the AssemblyLine is started
synchronously, when false
the AssemblyLine is
started asynchronously.aGetEntryOnEachCycle
- when true
the AssemblyLineListener delivers the
current entry on each AssemblyLine cycle, when
false
the entries are not delivered.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLineHandler startAssemblyLineManual(java.lang.String aAssemblyLineName, Entry aInputData) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aInputData
- Initial Work Entry to run the AssemblyLine with.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aTcb
- The TaskCallBlock object to start the AL with.
DIException
- if an error occurs when starting the AssemblyLine.AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb, boolean aSync) throws DIException
aAssemblyLineName
- The name of the AssemblyLine.aTcb
- The TaskCallBlock object to start the AL with.aSync
- when true
the AssemblyLine is started
synchronously, when false
the AssemblyLine is
started asynchronously.
DIException
- if an error occurs when starting the AssemblyLine.Sequence startSequence(java.lang.String name) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var seq = ci.startSequence("csv2xml");//Sequence is started
name
- The name of the Sequence.
DIException
- if an error occurs when starting the Sequence.Sequence startSequence(java.lang.String name, TaskCallBlock tcb, boolean sync) throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var seq = ci.startSequence("csv2xml", null, true);//Sequence is started in new thread, and has now run to completion //do something with seq
name
- The name of the Sequence.tcb
- The TaskCallBlock object to start the Sequence with. If null, ignored.sync
- when true
the Sequence is started
synchronously, when false
the Sequence is
started asynchronously.
DIException
- if an error occurs when starting the Sequence.Sequence startSequence(java.lang.String name, TaskCallBlock tcb, AssemblyLineListener listener) throws DIException
name
- The name of the Sequence.tcb
- The TaskCallBlock object to start the Sequence with.listener
- A listener to know when the Sequence has stopped.
DIException
- if an error occurs when starting the Sequence.void reload() throws DIException
DIException
- if an error occurs while reloading the server.void stop() throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); ci.stop();
DIException
- if an error occurs while stopping.void stop(boolean sync) throws DIException
Example:
var ci = session.getConfigInstance("myProject"); ci.stop(false);
sync
- If true, waiting will occur in new Threads.
DIException
- if an error occurs while stopping.java.lang.String[] getALLogFileNames(java.lang.String aALName) throws DIException
aALName
- the name of the AssemblyLine.
DIException
- if an error occurs while obtaining AssemblyLine's log file
names.java.lang.String getALLastLogFileName(java.lang.String aALName) throws DIException
aALName
- the name of the AssemblyLine.
DIException
- if an error occurs while obtaining the log file name.java.lang.String getALLog(java.lang.String aALName, java.lang.String aLogFileName) throws DIException
aALName
- the name of the AssemblyLine.aLogFileName
- the name of the log file; no file path should be specified -
just the file name.
DIException
- if an error occurs while obtaining AssemblyLine's log.java.lang.String getALLogLastChunk(java.lang.String aALName, java.lang.String aLogFileName, int aKilobytes) throws DIException
aALName
- the name of the AssemblyLine.aLogFileName
- the name of the log file; no file path should be specified -
just the file name.aKilobytes
- specifies in kilobytes the size of the log's last chunk that
will be read.
DIException
- if an error occurs while obtaining AssemblyLine's log.java.util.Date getInstanceBootTime() throws DIException
java.util.Date
specifying the date and time the
instance was started.
DIException
- if an error occurs while retrieving instance's boot time.java.lang.String getGlobalUniqueID() throws DIException
Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); task.logmsg("Config ID: " + ci.getGlobalUniqueID()); //Sample output: Config ID: 19245595421206360821315
DIException
- if an error occurs while retrieving the Config Instance GUID
value.java.lang.String[] getConnectorPoolNames() throws DIException
DIException
- if an error occurs while retrieving the names of all
Connector Pools.int getConnectorPoolSize(java.lang.String aConnectorPoolName) throws DIException
aConnectorPoolName
- the name of the Connector Pool.
DIException
- if an error occurs while retrieving the size of the specified
Connector Pool.int getConnectorPoolFreeNum(java.lang.String aConnectorPoolName) throws DIException
aConnectorPoolName
- the name of the Connector Pool.
DIException
- if an error occurs while retrieving the number of free
Connectors in the specified Connector Pool.PoolDefConfig getConnectorPoolConfig(java.lang.String aConnectorPoolName) throws DIException
aConnectorPoolName
- the name of the Connector Pool.
DIException
- if an error occurs while retrieving the Connector Pool
configuration object.int purgeConnectorPool(java.lang.String aConnectorPoolName) throws DIException
aConnectorPoolName
- the name of the Connector Pool.
DIException
- if an error occurs while shrinking the Connector Pool.TDIProperties getTDIProperties() throws java.lang.Exception
java.lang.Exception
- if an error occurs while obtaining a reference to
TDIProperties.java.lang.String getConfigPath()
Example:
var ci = session.getConfigInstance("C__Documents and Settings_Username_My Documents_TDI_rs.xml"); task.logmsg("CI path: " + ci.getConfigPath()); //Sample output: CI path: "C:\Documents and Settings\Username\My Documents\TDI"
java.lang.String getConfigurationFile() throws DIException
Session.listAllConfigurations()
would return. It could be either
a solution name or a path relative to the base config folder.
DIException
- if an error occurs while retrieving configuration file
referencevoid addLogListener(LogListener listener) throws DIException
listener
- Listener for logged messages.
DIException
- If an error occurs during registration, e.g. the listener is
null.removeLogListener(LogListener)
void removeLogListener(LogListener listener) throws DIException
Unregister listener for messages logged by this configuration instance. You must be admin to execute this method.
Listeners are associated with the API object, not with the AssemblyLine
in the Server, so you can remove only listeners added with the
addLogListener(LogListener)
method on the same object.
Do not invoke this method from within the listener while the listener is being notified because a deadlock may occur.
listener
- Registered listener.
DIException
- If an error occurs while unregistering the listener, e.g. the
listener is null or is not registered.addLogListener(LogListener)
java.util.Map<java.lang.String,java.lang.Object> getSchedulerInfo(java.lang.String name)
name
- - Name of SchedulerScheduler.getInfo();
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getSchedulersInfo()
Scheduler.getInfo();
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |