Package com.ibm.di.api.jmx.mbeans
Class ConfigInstance
- java.lang.Object
-
- com.ibm.di.api.jmx.mbeans.BaseAdmin
-
- com.ibm.di.api.jmx.mbeans.ConfigInstance
-
- All Implemented Interfaces:
BaseAdminMBean,BaseMBean,ConfigInstanceMBean
public class ConfigInstance extends BaseAdmin implements ConfigInstanceMBean
ConfigInstance class implements public methods exposed through JMX layer.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMBEAN_TYPEType of the MBean.
-
Constructor Summary
Constructors Constructor Description ConfigInstance(ConfigInstance aConfigInstance)Class constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.management.ObjectNamegenObjectName(java.lang.String aConfigInstanceName)Generates object name for specified assembly line handler.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, java.lang.Integer aKilobytes)Retrieves the last chunk from a specified AssemblyLine's log file.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.javax.management.ObjectName[]getAssemblyLines()Returns the names of currently started AssemblyLines of the configuration each represented as ObjectName generated from AssemblyLine's name and unique code.java.lang.String[]getAssemblyLinesNames()Deprecated.java.lang.StringgetConfigId()Returns the configuration ID generated by the server.java.lang.StringgetConfigPath()Retrieves the config path.MetamergeConfiggetConfiguration()Returns configuration instance representing this configuration.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.lang.StringgetId()Reads attribute "Id".java.util.DategetInstanceBootTime()Returns the Instance boot time.javax.management.ObjectNamegetTDIProperties()Access to the TDIProperies for the particular config.java.lang.StringgetType()Reads attribute "Type".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.voidsaveConfiguration()Deprecated.voidsaveConfiguration(java.lang.Boolean aEncrypt)Deprecated.voidsaveExternalProperties()Deprecated.voidsetConfiguration(MetamergeConfig aConfiguration)Sets given configuration to this configuration.voidsetExternalProperties(ExternalPropertiesConfig aExPropConfig)Deprecated.voidsetExternalProperties(java.lang.String aKey, ExternalPropertiesConfig aExPropConfig)Deprecated.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName)Starts the specified AssemblyLine asynchronously.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData)Starts the specified AssemblyLine with the given input data asynchronously.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs)Starts asynchronously the specified AssemblyLine with the given input data and results listener.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs, java.lang.Boolean aSync)Starts the specified AssemblyLine with the given input data and results listener.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs, java.lang.Boolean aSync, java.lang.Boolean aGetEntryOnEachCycle)Starts the specified AssemblyLine with the given input data and results listener.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, java.lang.Boolean aSync)Starts the specified AssemblyLine with the given input data.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb)Starts asynchronously the specified AssemblyLine with the given TaskCallBlock.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb, java.lang.Boolean aSync)Starts the specified AssemblyLine with the given TaskCallBlock.javax.management.ObjectNamestartAssemblyLine(java.lang.String aAssemblyLineName, java.lang.Boolean aSync)Starts the specified AssemblyLine.javax.management.ObjectNamestartAssemblyLineManual(java.lang.String aAssemblyLineName, Entry aInputData)Starts the specified AssemblyLine with the given input data in manual mode.voidstop()Stops the Config Instance.-
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
-
-
-
-
Field Detail
-
MBEAN_TYPE
public static final java.lang.String MBEAN_TYPE
Type of the MBean.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConfigInstance
public ConfigInstance(ConfigInstance aConfigInstance) throws DIException
Class constructor.- Parameters:
aConfigInstance- com.ibm.di.api.local.ConfigInstance- Throws:
DIException
-
-
Method Detail
-
getType
public java.lang.String getType()
Reads attribute "Type".getType()andgetId()are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as"type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".
-
getId
public java.lang.String getId() throws DIExceptionReads attribute "Id". The "Id" value should be different for different MBeans of the same type.getType()andgetId()are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as"type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".- Specified by:
getIdin interfaceBaseMBean- Returns:
- the Id of this MBean.
- Throws:
DIException- if an error occurs while obtaining MBean's Id.
-
getConfigId
public java.lang.String getConfigId() throws DIExceptionReturns the configuration ID generated by the server.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); var res = jmxMBeanServer.getAttribute(on,"ConfigId"); task.logmsg("Result "+ res); } Sample output: Result C__Documents and Settings_username_My Documents_TDI_rs.xml- Specified by:
getConfigIdin interfaceConfigInstanceMBean- Returns:
- String object representing the configuration ID.
- Throws:
DIException- if an error occurs while getting the configuration ID.
-
getConfiguration
public MetamergeConfig getConfiguration() throws DIException
Returns configuration instance representing this configuration.- Specified by:
getConfigurationin interfaceConfigInstanceMBean- Returns:
- MetamergeConfig object representing this configuration.
- Throws:
DIException- if an error occurs while getting the configuration.
-
setConfiguration
public void setConfiguration(MetamergeConfig aConfiguration) throws DIException
Sets given configuration to this configuration.- Specified by:
setConfigurationin interfaceConfigInstanceMBean- Parameters:
aConfiguration- The new configuration.- Throws:
DIException- if an error occurs while setting the configuration.
-
saveConfiguration
@Deprecated public void saveConfiguration() throws DIExceptionDeprecated.- Specified by:
saveConfigurationin interfaceConfigInstanceMBean- Throws:
DIException
-
saveConfiguration
@Deprecated public void saveConfiguration(java.lang.Boolean aEncrypt) throws DIExceptionDeprecated.- Specified by:
saveConfigurationin interfaceConfigInstanceMBean- Throws:
DIException
-
getExternalProperties
public ExternalPropertiesConfig getExternalProperties() throws DIException
Returns the external properties of the configuration.- Specified by:
getExternalPropertiesin interfaceConfigInstanceMBean- Returns:
- ExternalPropertiesConfig object representing the configuration's external properties.
- Throws:
DIException- if an error occurs while getting the external properties.
-
getExternalProperties
public ExternalPropertiesConfig getExternalProperties(java.lang.String aKey) throws DIException
Returns the ExternalPropertiesConfig object for the named external properties object.- Specified by:
getExternalPropertiesin interfaceConfigInstanceMBean- 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.
-
getExternalPropertiesKeys
public java.lang.String[] getExternalPropertiesKeys() throws DIExceptionReturns the external properties object names.- Specified by:
getExternalPropertiesKeysin interfaceConfigInstanceMBean- Returns:
- String array each value representing one external property object name.
- Throws:
DIException- if an error occurs while getting the external properties names.
-
setExternalProperties
@Deprecated public void setExternalProperties(ExternalPropertiesConfig aExPropConfig) throws DIException
Deprecated.- Specified by:
setExternalPropertiesin interfaceConfigInstanceMBean- Throws:
DIException
-
setExternalProperties
@Deprecated public void setExternalProperties(java.lang.String aKey, ExternalPropertiesConfig aExPropConfig) throws DIExceptionDeprecated.- Specified by:
setExternalPropertiesin interfaceConfigInstanceMBean- Throws:
DIException
-
saveExternalProperties
@Deprecated public void saveExternalProperties() throws DIExceptionDeprecated.- Specified by:
saveExternalPropertiesin interfaceConfigInstanceMBean- Throws:
DIException
-
getAssemblyLinesNames
@Deprecated public java.lang.String[] getAssemblyLinesNames() throws DIExceptionDeprecated.- Specified by:
getAssemblyLinesNamesin interfaceConfigInstanceMBean- Throws:
DIException
-
getAssemblyLineNames
public java.lang.String[] getAssemblyLineNames() throws DIExceptionReturns the AssemblyLines' names.- Specified by:
getAssemblyLineNamesin interfaceConfigInstanceMBean- Returns:
- String array each value representing AssemblyLine name.
- Throws:
DIException- if an error occurs while getting the AssemblyLines' names.
-
getAssemblyLineInputParameters
public SchemaConfig getAssemblyLineInputParameters(java.lang.String aAssemblyLineName) throws DIException
Returns the AssemblyLine's input parameters.- Specified by:
getAssemblyLineInputParametersin interfaceConfigInstanceMBean- 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.
-
getAssemblyLineOutputParameters
public SchemaConfig getAssemblyLineOutputParameters(java.lang.String aAssemblyLineName) throws DIException
Returns the AssemblyLine's output parameters.- Specified by:
getAssemblyLineOutputParametersin interfaceConfigInstanceMBean- 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.
-
getAssemblyLines
public javax.management.ObjectName[] getAssemblyLines() throws DIExceptionReturns the names of currently started AssemblyLines of the configuration each represented as ObjectName generated from AssemblyLine's name and unique code.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); var res = jmxMBeanServer.getAttribute(on,"AssemblyLines"); task.logmsg("Result "+ res); } Sample output: Result ServerAPI:type=AssemblyLine,id=AssemblyLines/test.2- Specified by:
getAssemblyLinesin interfaceConfigInstanceMBean- Returns:
- ObjectName array each value representing ObjectName object of an AssemblyLine.
- Throws:
DIException- if an error occurs while getting the AssemblyLines' names.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName) throws DIExceptionStarts the specified AssemblyLine asynchronously.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL( "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml"), new Array( "java.lang.String"));- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- Parameters:
aAssemblyLineName- The name of the AssemblyLine.- Returns:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, java.lang.Boolean aSync) throws DIExceptionStarts the specified AssemblyLine.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL( "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml", new Boolean("false")), new Array("java.lang.String", "java.lang.Boolean"));- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aSync- whentruethe AssemblyLine is started synchronously, whenfalsethe AssemblyLine is started asynchronously.- Returns:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData) throws DIExceptionStarts the specified AssemblyLine with the given input data asynchronously.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL( "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); jmxMBeanServer.invoke(on, "s", new Array("csv2xml", work), new Array( "java.lang.String", "com.ibm.di.entry.Entry"));- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aInputData- Initial Work Entry to run the AssemblyLine with.- Returns:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, java.lang.Boolean aSync) throws DIExceptionStarts the specified AssemblyLine with the given input data.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL( "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } jmxMBeanServer.invoke(on, "startAssemblyLine", new Array("csv2xml", work, new Boolean("true")), new Array("java.lang.String", "com.ibm.di.entry.Entry", "java.lang.Boolean"));- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- 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:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs) throws DIExceptionStarts asynchronously the specified AssemblyLine with the given input data and results listener.- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- 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.- Returns:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs, java.lang.Boolean aSync) throws DIExceptionStarts the specified AssemblyLine with the given input data and results listener.- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- 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:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, Entry aInputData, AssemblyLineListener aListener, java.lang.Boolean aGetLogs, java.lang.Boolean aSync, java.lang.Boolean aGetEntryOnEachCycle) throws DIExceptionStarts the specified AssemblyLine with the given input data and results listener.- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- 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:
- ObjectName generated from the name and the unique code of the given AssemblyLine..
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLineManual
public javax.management.ObjectName startAssemblyLineManual(java.lang.String aAssemblyLineName, Entry aInputData) throws DIExceptionStarts the specified AssemblyLine with the given input data in manual mode.- Specified by:
startAssemblyLineManualin interfaceConfigInstanceMBean- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aInputData- Initial Work Entry to run the AssemblyLine with.- Returns:
- ObjectName generated from the mbean server domain name and the key property list of the AssemblyLineHandler of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb) throws DIExceptionStarts asynchronously the specified AssemblyLine with the given TaskCallBlock.- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- Parameters:
aAssemblyLineName- The name of the AssemblyLine.aTcb- The TaskCallBlock object to start the AL with.- Returns:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
startAssemblyLine
public javax.management.ObjectName startAssemblyLine(java.lang.String aAssemblyLineName, TaskCallBlock aTcb, java.lang.Boolean aSync) throws DIExceptionStarts the specified AssemblyLine with the given TaskCallBlock.- Specified by:
startAssemblyLinein interfaceConfigInstanceMBean- 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:
- ObjectName generated from the name and the unique code of the given AssemblyLine.
- Throws:
DIException- if an error occurs when starting the AssemblyLine.
-
reload
public void reload() throws DIExceptionReloads the Config Instance with its current configuration.- Specified by:
reloadin interfaceConfigInstanceMBean- Throws:
DIException- if an error occurs while reloading the server.
-
stop
public void stop() throws DIExceptionStops the Config Instance.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL( "service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName() == "com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); jmxMBeanServer.invoke(on, "stop", null, null);- Specified by:
stopin interfaceConfigInstanceMBean- Throws:
DIException- if an error occurs while stopping.
-
getALLogFileNames
public java.lang.String[] getALLogFileNames(java.lang.String aALName) throws DIExceptionReturns the names of all available log files for a given AssemblyLine.- Specified by:
getALLogFileNamesin interfaceConfigInstanceMBean- 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.
-
getALLastLogFileName
public java.lang.String getALLastLogFileName(java.lang.String aALName) throws DIExceptionReturns the name of the log file created on the last run of a given AssemblyLine.- Specified by:
getALLastLogFileNamein interfaceConfigInstanceMBean- 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.
-
getALLog
public java.lang.String getALLog(java.lang.String aALName, java.lang.String aLogFileName) throws DIExceptionGiven an AssemblyLine name, and a log file name, retrieves the log of this AssemblyLine, stored in the specified file.- Specified by:
getALLogin interfaceConfigInstanceMBean- 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.
-
getALLogLastChunk
public java.lang.String getALLogLastChunk(java.lang.String aALName, java.lang.String aLogFileName, java.lang.Integer aKilobytes) throws DIExceptionRetrieves the last chunk from a specified AssemblyLine's log file.- Specified by:
getALLogLastChunkin interfaceConfigInstanceMBean- 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.
-
getInstanceBootTime
public java.util.Date getInstanceBootTime() throws DIExceptionReturns the Instance boot time.- Specified by:
getInstanceBootTimein interfaceConfigInstanceMBean- 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.
-
genObjectName
public static javax.management.ObjectName genObjectName(java.lang.String aConfigInstanceName) throws DIExceptionGenerates object name for specified assembly line handler.- Parameters:
aConfigInstanceName- the name of the config instance.- Returns:
- the generated object name
- Throws:
DIException- if error occurs while creating AssemblyLineHandler JMX object name.
-
getGlobalUniqueID
public java.lang.String getGlobalUniqueID() throws DIExceptionReturns the Config Instance GUID. The GUID is a string value that is unique for each component ever created by a particular TDI Server.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); var res = jmxMBeanServer.getAttribute(on,"GlobalUniqueID"); task.logmsg("Result "+ res); } Sample output:Result 17135304020- Specified by:
getGlobalUniqueIDin interfaceConfigInstanceMBean- Returns:
- The Config Instance GUID value.
- Throws:
DIException- if an error occurs while retrieving GlobalUniqueID.
-
getConnectorPoolNames
public java.lang.String[] getConnectorPoolNames() throws DIExceptionReturns the names of all Connector Pools in the Config Instance.- Specified by:
getConnectorPoolNamesin interfaceConfigInstanceMBean- Returns:
- String array containing the Connector Pool names.
- Throws:
DIException- if an error occurs while retrieving Connector Pool names.
-
getConnectorPoolSize
public int getConnectorPoolSize(java.lang.String aConnectorPoolName) throws DIExceptionReturns the size of the specified Connector Pool.- Specified by:
getConnectorPoolSizein interfaceConfigInstanceMBean- 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 Connector Pool size.
-
getConnectorPoolFreeNum
public int getConnectorPoolFreeNum(java.lang.String aConnectorPoolName) throws DIExceptionReturns the number of free Connectors in the specified Connector Pool.- Specified by:
getConnectorPoolFreeNumin interfaceConfigInstanceMBean- 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 Connector Pool free Connectors.
-
getConnectorPoolConfig
public PoolDefConfig getConnectorPoolConfig(java.lang.String aConnectorPoolName) throws DIException
Returns the Connector Pool configuration object.- Specified by:
getConnectorPoolConfigin interfaceConfigInstanceMBean- 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.
-
purgeConnectorPool
public int purgeConnectorPool(java.lang.String aConnectorPoolName) throws DIExceptionUnused Connectors will be released so that the Pool is shrunk to its minimum size.- Specified by:
purgeConnectorPoolin interfaceConfigInstanceMBean- 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 to its minimum size.
-
getTDIProperties
public javax.management.ObjectName getTDIProperties() throws java.lang.ExceptionAccess to the TDIProperies for the particular config.- Specified by:
getTDIPropertiesin interfaceConfigInstanceMBean- Returns:
- ObjectName containing the TDI Properties of the Config.
- Throws:
java.lang.Exception- if an error occurs while getting TDI Properties
-
getConfigPath
public java.lang.String getConfigPath()
Retrieves the config path.Example
//for local access to jmx layer use: var jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer(); var jmxUrl = new javax.management.remote.JMXServiceURL("service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxconnector"); var jmxConnector = javax.management.remote.JMXConnectorFactory.connect(jmxUrl); var jmxMBeanServer = jmxConnector.getMBeanServerConnection(); mBeans = jmxMBeanServer.queryMBeans(null, null).iterator(); while (mBeans.hasNext()) { var mb = mBeans.next(); if (mb.getClassName()=="com.ibm.di.api.jmx.mbeans.ConfigInstance") break; } var on = mb.getObjectName(); var res = jmxMBeanServer.getAttribute(on,"ConfigPath"); task.logmsg("Result "+ res); } Sample output:Result C:\Documents and Settings\Username\My Documents\TDI\rs.xml- Specified by:
getConfigPathin interfaceConfigInstanceMBean- Returns:
- The absolute path of the configuration file.
-
-