Class ConfigInstanceImpl
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- com.ibm.di.api.remote.impl.APIRemoteObject
-
- com.ibm.di.api.remote.impl.ConfigInstanceImpl
-
- All Implemented Interfaces:
ConfigInstance,java.io.Serializable,java.rmi.Remote,java.rmi.server.Unreferenced
public class ConfigInstanceImpl extends APIRemoteObject implements ConfigInstance, java.rmi.server.Unreferenced
This class implements methods exposed through Server API remote session.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddLogListener(LogListener listener)Register listener for messages logged by this configuration instance.static ConfigInstanceImplcreateInstance(ConfigInstance aLocalConfigInstance, SessionImpl aSession)Creates new instance of this class.java.lang.StringgetALLastLogFileName(java.lang.String aALName)Returns the name of the log file created on the last run of a given AssemblyLine.java.lang.StringgetALLog(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.StringgetALLogLastChunk(java.lang.String aALName, java.lang.String aLogFileName, int aKilobytes)Retrieves the last chunk from a specified AssemblyLine's log file.AssemblyLinegetAssemblyLineByUniqueCode(int alId)Searches the list of AssemblyLines for the specified unique code (one returned by theConfigInstance.getAssemblyLineUniqueCodes()method)SchemaConfiggetAssemblyLineInputParameters(java.lang.String aAssemblyLineName)Returns the AssemblyLine's input parameters.java.lang.String[]getAssemblyLineNames()Returns the AssemblyLines' names.SchemaConfiggetAssemblyLineOutputParameters(java.lang.String aAssemblyLineName)Returns the AssemblyLine's output parameters.AssemblyLine[]getAssemblyLines()Returns currently started AssemblyLines of the configuration instance.java.lang.String[]getAssemblyLinesNames()int[]getAssemblyLineUniqueCodes()Returns a list of integers uniquely identify all the AssemblyLines within the ConfigInstance.java.lang.StringgetConfigId()Returns the configuration ID generated by the server.java.lang.StringgetConfigPath()Retrieves absolut configuration path.MetamergeConfiggetConfiguration()Returns configuration instance representing this configuration.java.lang.StringgetConfigurationFile()Retrieves a reference to the Configuration file used to load this instance from.PoolDefConfiggetConnectorPoolConfig(java.lang.String aConnectorPoolName)Returns the Connector Pool configuration object.intgetConnectorPoolFreeNum(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.intgetConnectorPoolSize(java.lang.String aConnectorPoolName)Returns the size of the specified Connector Pool.ExternalPropertiesConfiggetExternalProperties()Returns the external properties of the configuration.ExternalPropertiesConfiggetExternalProperties(java.lang.String aKey)Returns the ExternalPropertiesConfig object for the named external properties object.java.lang.String[]getExternalPropertiesKeys()Returns the external properties object names.java.lang.StringgetGlobalUniqueID()Returns the Config Instance GUID.java.util.DategetInstanceBootTime()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.TDIPropertiesgetTDIProperties()Returns the TDIProperties object associated with the current configuration.intpurgeConnectorPool(java.lang.String aConnectorPoolName)Unused Connectors will be released so that the Pool is shrunk to its minimum size.voidreload()Reloads the Config Instance with its current configuration.voidremoveLogListener(LogListener listener)Unregister listener for messages logged by this configuration instance.voidsaveConfiguration()Deprecated.not supported.voidsaveConfiguration(boolean aEncrypt)Deprecated.not supported.voidsaveExternalProperties()voidsetConfiguration(MetamergeConfig aConfiguration)Sets given configuration to this configuration.voidsetExternalProperties(ExternalPropertiesConfig aExPropConfig)voidsetExternalProperties(java.lang.String aKey, ExternalPropertiesConfig aExPropConfig)AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName)Starts the specified AssemblyLine asynchronously.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, boolean aSync)Starts the specified AssemblyLine.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData)Starts the specified AssemblyLine with the given input data asynchronously.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, boolean aSync)Starts the specified AssemblyLine with the given input data.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs)Starts asynchronously the specified AssemblyLine with the given input data and results listener.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs, boolean aSync)Starts the specified AssemblyLine with the given input data and results listener.AssemblyLinestartAssemblyLine(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.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb)Starts asynchronously the specified AssemblyLine with the given TaskCallBlock.AssemblyLinestartAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb, boolean aSync)Starts the specified AssemblyLine with the given TaskCallBlock.AssemblyLineHandlerstartAssemblyLineManual(java.lang.String aAssemblyLineName, Entry aInputData)Starts the specified AssemblyLine with the given input data in manual mode.SequencestartSequence(java.lang.String name)Starts the specified Sequence.SequencestartSequence(java.lang.String name, TaskCallBlock tcb, boolean sync)Starts the specified Sequence specifying a TaskCallBlock, synchronous or asynchronous.SequencestartSequence(java.lang.String name, TaskCallBlock tcb, AssemblyLineListener listener)Starts the specified Sequence with the given TaskCallBlock and a Listenervoidstop()Stops the Config Instance.voidstop(boolean sync)Stops the Config Instance, and all AssemblyLines started by it, and waits a while for the stopping.voidunreferenced()-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Method Detail
-
getConfigId
public java.lang.String getConfigId() throws DIException, java.rmi.RemoteExceptionReturns the configuration ID generated by the server.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); for( ci in remoteSession.getConfigInstances()){ task.logmsg("Name: " + ci.getConfigId()); }- Specified by:
getConfigIdin interfaceConfigInstance- Returns:
- String object representing the configuration ID.
- Throws:
DIException- if an error occurs while getting the configuration ID.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConfiguration
public MetamergeConfig getConfiguration() throws DIException, java.rmi.RemoteException
Returns configuration instance representing this configuration.- Specified by:
getConfigurationin interfaceConfigInstance- Returns:
- MetamergeConfig object representing this configuration.
- Throws:
DIException- if an error occurs while getting the configuration.java.rmi.RemoteException- if a communication-related exception occurs.
-
setConfiguration
public void setConfiguration(MetamergeConfig aConfiguration) throws DIException, java.rmi.RemoteException
Sets given configuration to this configuration.- Specified by:
setConfigurationin interfaceConfigInstance- Parameters:
aConfiguration- The new configuration.- Throws:
DIException- if an error occurs while setting the configuration.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLinesNames
public java.lang.String[] getAssemblyLinesNames() throws DIException, java.rmi.RemoteException- Specified by:
getAssemblyLinesNamesin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
getAssemblyLineUniqueCodes
public int[] getAssemblyLineUniqueCodes() throws DIException, java.rmi.RemoteExceptionReturns a list of integers uniquely identify all the AssemblyLines within the ConfigInstance.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- Specified by:
getAssemblyLineUniqueCodesin interfaceConfigInstance- Returns:
- integer list each value representing AssemblyLine id.
- Throws:
DIException- if an error occurs while getting the AssemblyLines' IDs.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLineByUniqueCode
public AssemblyLine getAssemblyLineByUniqueCode(int alId) throws DIException, java.rmi.RemoteException
Searches the list of AssemblyLines for the specified unique code (one returned by theConfigInstance.getAssemblyLineUniqueCodes()method)- Specified by:
getAssemblyLineByUniqueCodein interfaceConfigInstance- Parameters:
alId- the AssemblyLine ID uniquely identifying the AssemblyLine instance in the scope of the ConfigInstance.- Returns:
- the AssemblyLine found or null
- Throws:
DIException- if an error occurs while getting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLineNames
public java.lang.String[] getAssemblyLineNames() throws DIException, java.rmi.RemoteExceptionReturns the AssemblyLines' names.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ for(al in ci.getAssemblyLineNames()){ task.logmsg("Al name: " + al); } } } else { task.logmsg("no available config instances"); }- Specified by:
getAssemblyLineNamesin interfaceConfigInstance- Returns:
- String array each value representing AssemblyLine name.
- Throws:
DIException- if an error occurs while getting the AssemblyLines' names.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLineInputParameters
public SchemaConfig getAssemblyLineInputParameters(java.lang.String aAssemblyLineName) throws DIException, java.rmi.RemoteException
Returns the AssemblyLine's input parameters.- Specified by:
getAssemblyLineInputParametersin interfaceConfigInstance- Parameters:
aAssemblyLineName- the name of the AssemblyLine.- Returns:
- SchemaConfig representing the schema input of the AssemblyLine.
- Throws:
DIException- if an error occurs while getting the AssemblyLine's input parameters.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLineOutputParameters
public SchemaConfig getAssemblyLineOutputParameters(java.lang.String aAssemblyLineName) throws DIException, java.rmi.RemoteException
Returns the AssemblyLine's output parameters.- Specified by:
getAssemblyLineOutputParametersin interfaceConfigInstance- Parameters:
aAssemblyLineName- the name of the AssemblyLine.- Returns:
- SchemaConfig representing the schema output of the AssemblyLine.
- Throws:
DIException- if an error occurs while getting the AssemblyLine's output parameters.java.rmi.RemoteException- if a communication-related exception occurs.
-
getAssemblyLines
public AssemblyLine[] getAssemblyLines() throws DIException, java.rmi.RemoteException
Returns currently started AssemblyLines of the configuration instance.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ for(al in ci.getAssemblyLines()){ task.logmsg("Al name: " + al.getName()); } } } else { task.logmsg("no available config instances"); }- Specified by:
getAssemblyLinesin interfaceConfigInstance- Returns:
- AssemblyLine array object each value represents currently started AssemblyLine.
- Throws:
DIException- if an error occurs while getting the AssemblyLines.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine asynchronously.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var ci = remoteSession.getConfigInstance("exampleCI"); var al = ci.startAssemblyLine("exampleAL");- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, boolean aSync) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var ci = remoteSession.getConfigInstance("exampleCI"); var al = ci.startAssemblyLine("exampleAL", false);- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given input data asynchronously.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var mAssemblyLine = remoteSession.getAssemblyLines()[0]; if (mAssemblyLine != null) { var ci = mAssemblyLine.getConfigInstance(); var al = ci.startAssemblyLine("exampleAL", work); } else { main.logmsg("No Remote Assembly Lines Running"); }- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aInputData- Initial Work Entry to run the AssemblyLine with.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, boolean aSync) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given input data.When the AssemblyLine is started synchronously it waits the current thread to die and starts after that.
Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var mAssemblyLine = remoteSession.getAssemblyLines()[0]; if (mAssemblyLine != null) { var ci = mAssemblyLine.getConfigInstance(); var al = ci.startAssemblyLine("exampleAL", work, false); } else { main.logmsg("No Remote Assembly Lines Running"); }- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aInputData- Initial Work Entry to run the AssemblyLine with.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs) throws DIException, java.rmi.RemoteException
Starts asynchronously the specified AssemblyLine with the given input data and results listener.- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
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- whentruethe AssemblyLineListener is delivered log messages, whenfalselog messages are not delivered.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs, boolean aSync) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given input data and results listener.When the AssemblyLine is started synchronously it waits the current thread to die and starts after that.
- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
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- whentruethe AssemblyLineListener delivers log messages, whenfalselog messages are not delivered.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, boolean aGetLogs, boolean aSync, boolean aGetEntryOnEachCycle) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given input data and results listener.When the AssemblyLine is started synchronously it waits the current thread to die and starts after that.
- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
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- whentruethe AssemblyLineListener delivers log messages, whenfalselog messages are not delivered.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.aGetEntryOnEachCycle- whentruethe AssemblyLineListener delivers the current entry on each AssemblyLine cycle, whenfalsethe entries are not delivered.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLineManual
public AssemblyLineHandler startAssemblyLineManual(java.lang.String aAssemblyLineName, Entry aInputData) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given input data in manual mode.- Specified by:
startAssemblyLineManualin interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aInputData- Initial Work Entry to run the AssemblyLine with.- Returns:
- the AssemblyLineHandler object for AssemblyLine manipulation in manual mode.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb) throws DIException, java.rmi.RemoteException
Starts asynchronously the specified AssemblyLine with the given TaskCallBlock.- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aTcb- The TaskCallBlock object to start the AL with.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
startAssemblyLine
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb, boolean aSync) throws DIException, java.rmi.RemoteException
Starts the specified AssemblyLine with the given TaskCallBlock.- Specified by:
startAssemblyLinein interfaceConfigInstance- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aTcb- The TaskCallBlock object to start the AL with.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.- Returns:
- the AssemblyLine object.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.java.rmi.RemoteException- if a communication-related exception occurs.
-
reload
public void reload() throws DIException, java.rmi.RemoteExceptionReloads the Config Instance with its current configuration.- Specified by:
reloadin interfaceConfigInstance- Throws:
DIException- if an error occurs while reloading the server.java.rmi.RemoteException- if a communication-related exception occurs.
-
stop
public void stop() throws DIException, java.rmi.RemoteExceptionStops the Config Instance.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ ci.stop(); } } else { task.logmsg("no available config instances"); }- Specified by:
stopin interfaceConfigInstance- Throws:
DIException- if an error occurs while stopping.java.rmi.RemoteException- if a communication-related exception occurs.
-
stop
public void stop(boolean sync) throws DIException, java.rmi.RemoteExceptionStops the Config Instance, and all AssemblyLines started by it, and waits a while for the stopping.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ ci.stop(false); } } else { task.logmsg("no available config instances"); }- Specified by:
stopin interfaceConfigInstance- Parameters:
sync- If true, creates new Threads on the server to do the waiting.- Throws:
DIException- if an error occurs while stopping.java.rmi.RemoteException- if a communication-related exception occurs.
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aALName) throws DIException, java.rmi.RemoteExceptionReturns the names of all available log files for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceConfigInstance- Parameters:
aALName- the name of the AssemblyLine.- Returns:
- a String array, each of its elements specifying the name of a log file.
- Throws:
DIException- if an error occurs while obtaining AssemblyLine's log file names.java.rmi.RemoteException- if a communication-related exception occurs.
-
getALLastLogFileName
public java.lang.String getALLastLogFileName(java.lang.String aALName) throws DIException, java.rmi.RemoteExceptionReturns the name of the log file created on the last run of a given AssemblyLine.- Specified by:
getALLastLogFileNamein interfaceConfigInstance- Parameters:
aALName- the name of the AssemblyLine.- Returns:
- the name of the log file created on the last AssemblyLine's run.
- Throws:
DIException- if an error occurs while obtaining the log file name.java.rmi.RemoteException- if a communication-related exception occurs.
-
getALLog
public java.lang.String getALLog(java.lang.String aALName, java.lang.String aLogFileName) throws DIException, java.rmi.RemoteExceptionGiven an AssemblyLine name, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.- Specified by:
getALLogin interfaceConfigInstance- Parameters:
aALName- the name of the AssemblyLine.aLogFileName- the name of the log file; no file path should be specified - just the file name.- Returns:
- the specified log of the AssemblyLine.
- Throws:
DIException- if an error occurs while obtaining AssemblyLine's log.java.rmi.RemoteException- if a communication-related exception occurs.
-
getALLogLastChunk
public java.lang.String getALLogLastChunk(java.lang.String aALName, java.lang.String aLogFileName, int aKilobytes) throws DIException, java.rmi.RemoteExceptionRetrieves the last chunk from a specified AssemblyLine's log file.- Specified by:
getALLogLastChunkin interfaceConfigInstance- Parameters:
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.- Returns:
- the last chunk of the specified AssemblyLine's log.
- Throws:
DIException- if an error occurs while obtaining AssemblyLine's log.java.rmi.RemoteException- if a communication-related exception occurs.
-
getInstanceBootTime
public java.util.Date getInstanceBootTime() throws DIException, java.rmi.RemoteExceptionReturns the Instance boot time.- Specified by:
getInstanceBootTimein interfaceConfigInstance- Returns:
- a
java.util.Datespecifying the date and time the instance was started. - Throws:
DIException- if an error occurs while retrieving instance's boot time.java.rmi.RemoteException- if a communication-related exception occurs.
-
saveConfiguration
public void saveConfiguration() throws DIException, java.rmi.RemoteExceptionDeprecated.not supported.- Specified by:
saveConfigurationin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
saveConfiguration
public void saveConfiguration(boolean aEncrypt) throws DIException, java.rmi.RemoteExceptionDeprecated.not supported.- Specified by:
saveConfigurationin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
getExternalProperties
public ExternalPropertiesConfig getExternalProperties() throws DIException, java.rmi.RemoteException
Returns the external properties of the configuration.- Specified by:
getExternalPropertiesin interfaceConfigInstance- Returns:
- ExternalPropertiesConfig object representing the configuration's external properties.
- Throws:
DIException- if an error occurs while getting the external properties.java.rmi.RemoteException- if a communication-related exception occurs.
-
getExternalProperties
public ExternalPropertiesConfig getExternalProperties(java.lang.String aKey) throws DIException, java.rmi.RemoteException
Returns the ExternalPropertiesConfig object for the named external properties object.- Specified by:
getExternalPropertiesin interfaceConfigInstance- Parameters:
aKey- The external property object name.- Returns:
- ExternalPropertiesConfig object representing the configuration's external properties specified by the external property object name.
- Throws:
DIException- if an error occurs while getting the external properties.java.rmi.RemoteException- if a communication-related exception occurs.
-
getExternalPropertiesKeys
public java.lang.String[] getExternalPropertiesKeys() throws DIException, java.rmi.RemoteExceptionReturns the external properties object names.- Specified by:
getExternalPropertiesKeysin interfaceConfigInstance- Returns:
- String array each value representing one external property object name.
- Throws:
DIException- if an error occurs while getting the external properties names.java.rmi.RemoteException- if a communication-related exception occurs.
-
setExternalProperties
public void setExternalProperties(ExternalPropertiesConfig aExPropConfig) throws DIException, java.rmi.RemoteException
- Specified by:
setExternalPropertiesin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
setExternalProperties
public void setExternalProperties(java.lang.String aKey, ExternalPropertiesConfig aExPropConfig) throws DIException, java.rmi.RemoteException- Specified by:
setExternalPropertiesin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
saveExternalProperties
public void saveExternalProperties() throws DIException, java.rmi.RemoteException- Specified by:
saveExternalPropertiesin interfaceConfigInstance- Throws:
DIExceptionjava.rmi.RemoteException
-
createInstance
public static ConfigInstanceImpl createInstance(ConfigInstance aLocalConfigInstance, SessionImpl aSession) throws DIException, java.rmi.RemoteException
Creates new instance of this class.- Parameters:
aLocalConfigInstance- local config instanceaSession- the SessionImpl object- Returns:
- ConfigInstanceImpl object
- Throws:
DIException- if error occurred while creating instance.java.rmi.RemoteException- if a communication-related exception occurs.
-
getGlobalUniqueID
public java.lang.String getGlobalUniqueID() throws DIException, java.rmi.RemoteExceptionReturns the Config Instance GUID. The GUID is a string value that is unique for each component ever created by a particular TDI Server.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ task.logmsg("CI path: " + ci.getGlobalUniqueID()); } } else { task.logmsg("no available config instances"); }- Specified by:
getGlobalUniqueIDin interfaceConfigInstance- Returns:
- The Config Instance GUID value.
- Throws:
DIException- if an error occurs while retrieving Config Instance GUID value.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConnectorPoolNames
public java.lang.String[] getConnectorPoolNames() throws DIException, java.rmi.RemoteExceptionReturns the names of all Connector Pools in the Config Instance.- Specified by:
getConnectorPoolNamesin interfaceConfigInstance- Returns:
- String array containing the Connector Pool names.
- Throws:
DIException- if an error occurs while retrieving Connector Pool names.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConnectorPoolSize
public int getConnectorPoolSize(java.lang.String aConnectorPoolName) throws DIException, java.rmi.RemoteExceptionReturns the size of the specified Connector Pool.- Specified by:
getConnectorPoolSizein interfaceConfigInstance- Parameters:
aConnectorPoolName- the name of the Connector Pool.- Returns:
- The current size of the specified Connector Pool.
- Throws:
DIException- if an error occurs while retrieving the size of the specified Connector Pool.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConnectorPoolFreeNum
public int getConnectorPoolFreeNum(java.lang.String aConnectorPoolName) throws DIException, java.rmi.RemoteExceptionReturns the number of free Connectors in the specified Connector Pool.- Specified by:
getConnectorPoolFreeNumin interfaceConfigInstance- Parameters:
aConnectorPoolName- the name of the Connector Pool.- Returns:
- The number of free Connectors in the specified Connector Pool.
- Throws:
DIException- if an error occurs while retrieving the number of free Connectors in the specified Connector Pool.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConnectorPoolConfig
public PoolDefConfig getConnectorPoolConfig(java.lang.String aConnectorPoolName) throws DIException, java.rmi.RemoteException
Returns the Connector Pool configuration object.- Specified by:
getConnectorPoolConfigin interfaceConfigInstance- Parameters:
aConnectorPoolName- the name of the Connector Pool.- Returns:
- The configuration object for the specified Connector Pool.
- Throws:
DIException- if an error occurs while retrieving Connector Pool configuration object.java.rmi.RemoteException- if a communication-related exception occurs.
-
purgeConnectorPool
public int purgeConnectorPool(java.lang.String aConnectorPoolName) throws DIException, java.rmi.RemoteExceptionUnused Connectors will be released so that the Pool is shrunk to its minimum size.- Specified by:
purgeConnectorPoolin interfaceConfigInstance- Parameters:
aConnectorPoolName- the name of the Connector Pool.- Returns:
- The size of the Connector Pool after shrinking.
- Throws:
DIException- if an error occurs while shrinking the Connector Pool.java.rmi.RemoteException- if a communication-related exception occurs.
-
getTDIProperties
public TDIProperties getTDIProperties() throws java.lang.Exception, java.rmi.RemoteException
Returns the TDIProperties object associated with the current configuration. The TDIProperties can then be used to obtain list of property stores, get/set/remove property values,etc.- Specified by:
getTDIPropertiesin interfaceConfigInstance- Returns:
- TDIProperties object associated with the current configuration.
- Throws:
java.lang.Exception- if an error occurs while retrieving TDIProperties object.java.rmi.RemoteException- if a communication-related exception occurs.
-
getConfigPath
public java.lang.String getConfigPath() throws java.rmi.RemoteExceptionRetrieves absolut configuration path.Example
var sessionFactory = java.rmi.Naming.lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var configInstances = remoteSession.getConfigInstances(); if (configInstances != null){ for (ci in configInstances){ task.logmsg("CI path: " + ci.getConfigPath()); } } else { task.logmsg("no available config instances"); }- Specified by:
getConfigPathin interfaceConfigInstance- Returns:
- The absolute path of the configuration file.
- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.
-
getConfigurationFile
public java.lang.String getConfigurationFile() throws DIException, java.rmi.RemoteExceptionDescription copied from interface:ConfigInstanceRetrieves a reference to the Configuration file used to load this instance from. This string is in the form of whatSession.listAllConfigurations()would return. It could be either a solution name or a path relative to the base config folder.- Specified by:
getConfigurationFilein interfaceConfigInstance- Returns:
- the configuration file reference or null if this is a temporary instance from an in-memory configuration.
- Throws:
DIException- if an error occurs while retrieving configuration file referencejava.rmi.RemoteException- if a communication-related exception occurs.
-
addLogListener
public void addLogListener(LogListener listener) throws DIException, java.rmi.RemoteException
Register listener for messages logged by this configuration instance. You must be admin to execute this method.- Specified by:
addLogListenerin interfaceConfigInstance- Parameters:
listener- Listener for logged messages.- Throws:
DIException- If an error occurs during registration, e.g. the listener is null.java.rmi.RemoteException- If a communication-related exception occurs.- See Also:
ConfigInstance.removeLogListener(LogListener)
-
removeLogListener
public void removeLogListener(LogListener listener) throws DIException, java.rmi.RemoteException
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
ConfigInstance.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.
- Specified by:
removeLogListenerin interfaceConfigInstance- Parameters:
listener- Registered listener.- Throws:
DIException- If an error occurs while unregistering the listener, e.g. the listener is null or is not registered.java.rmi.RemoteException- If a communication-related exception occurs.- See Also:
ConfigInstance.addLogListener(LogListener)
-
startSequence
public Sequence startSequence(java.lang.String name) throws DIException, java.rmi.RemoteException
Description copied from interface:ConfigInstanceStarts the specified Sequence.Example:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml"); var seq = ci.startSequence("csv2xml");//Sequence is started- Specified by:
startSequencein interfaceConfigInstance- Parameters:
name- The name of the Sequence.- Returns:
- the Sequence object.
- Throws:
DIException- if an error occurs when starting the Sequence.java.rmi.RemoteException- if a communication-related exception occurs.
-
startSequence
public Sequence startSequence(java.lang.String name, TaskCallBlock tcb, boolean sync) throws DIException, java.rmi.RemoteException
Description copied from interface:ConfigInstanceStarts the specified Sequence specifying a TaskCallBlock, synchronous or asynchronous.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- Specified by:
startSequencein interfaceConfigInstance- Parameters:
name- The name of the Sequence.tcb- The TaskCallBlock object to start the Sequence with. If null, ignored.sync- whentruethe Sequence is started synchronously, whenfalsethe Sequence is started asynchronously.- Returns:
- the Sequence object.
- Throws:
DIException- if an error occurs when starting the Sequence.java.rmi.RemoteException- if a communication-related exception occurs.
-
startSequence
public Sequence startSequence(java.lang.String name, TaskCallBlock tcb, AssemblyLineListener listener) throws DIException, java.rmi.RemoteException
Description copied from interface:ConfigInstanceStarts the specified Sequence with the given TaskCallBlock and a Listener- Specified by:
startSequencein interfaceConfigInstance- Parameters:
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.- Returns:
- the Sequence object.
- Throws:
DIException- if an error occurs when starting the Sequence.java.rmi.RemoteException- if a communication-related exception occurs.
-
getSchedulerInfo
public java.util.Map<java.lang.String,java.lang.Object> getSchedulerInfo(java.lang.String name) throws java.rmi.RemoteExceptionDescription copied from interface:ConfigInstanceReturns information about the named Scheduler. If the Scheduler is not found, returns null.- Specified by:
getSchedulerInfoin interfaceConfigInstance- Parameters:
name- - Name of Scheduler- Throws:
java.rmi.RemoteException
-
getSchedulersInfo
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getSchedulersInfo() throws java.rmi.RemoteExceptionDescription copied from interface:ConfigInstanceReturns information about all Schedulers in this RS. If no Schedulers are found, returns an empty List.- Specified by:
getSchedulersInfoin interfaceConfigInstance- Throws:
java.rmi.RemoteException
-
unreferenced
public void unreferenced()
- Specified by:
unreferencedin interfacejava.rmi.server.Unreferenced
-
-