|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.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
public class ConfigInstanceImpl
This class implements methods exposed through Server API remote session.
| Field Summary |
|---|
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Method Summary | |
|---|---|
void |
addLogListener(LogListener listener)
Register listener for messages logged by this configuration instance. |
static ConfigInstanceImpl |
createInstance(ConfigInstance aLocalConfigInstance,
SessionImpl aSession)
Creates new instance of this class. |
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 ConfigInstance.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()
|
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 absolut configuration path. |
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()
Returns the external properties of the configuration. |
ExternalPropertiesConfig |
getExternalProperties(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.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()
Returns the TDIProperties object associated with the current configuration. |
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()
|
void |
setConfiguration(MetamergeConfig aConfiguration)
Sets given configuration to this configuration. |
void |
setExternalProperties(ExternalPropertiesConfig aExPropConfig)
|
void |
setExternalProperties(java.lang.String aKey,
ExternalPropertiesConfig aExPropConfig)
|
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 started by it, and waits a while for the stopping. |
void |
unreferenced()
|
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String getConfigId()
throws DIException,
java.rmi.RemoteException
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());
}
getConfigId in interface ConfigInstanceDIException - if an error occurs while getting the configuration ID.
java.rmi.RemoteException - if a communication-related exception occurs.
public MetamergeConfig getConfiguration()
throws DIException,
java.rmi.RemoteException
getConfiguration in interface ConfigInstanceDIException - if an error occurs while getting the configuration.
java.rmi.RemoteException - if a communication-related exception occurs.
public void setConfiguration(MetamergeConfig aConfiguration)
throws DIException,
java.rmi.RemoteException
setConfiguration in interface ConfigInstanceaConfiguration - The new configuration.
DIException - if an error occurs while setting the configuration.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String[] getAssemblyLinesNames()
throws DIException,
java.rmi.RemoteException
getAssemblyLinesNames in interface ConfigInstanceDIException
java.rmi.RemoteException
public int[] getAssemblyLineUniqueCodes()
throws DIException,
java.rmi.RemoteException
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
getAssemblyLineUniqueCodes in interface ConfigInstanceDIException - if an error occurs while getting the AssemblyLines’ IDs.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine getAssemblyLineByUniqueCode(int alId)
throws DIException,
java.rmi.RemoteException
ConfigInstance.getAssemblyLineUniqueCodes() method)
getAssemblyLineByUniqueCode in interface ConfigInstancealId - the AssemblyLine ID uniquely identifying the AssemblyLine
instance in the scope of the ConfigInstance.
DIException - if an error occurs while getting the AssemblyLine.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String[] getAssemblyLineNames()
throws DIException,
java.rmi.RemoteException
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");
}
getAssemblyLineNames in interface ConfigInstanceDIException - if an error occurs while getting the AssemblyLines’ names.
java.rmi.RemoteException - if a communication-related exception occurs.
public SchemaConfig getAssemblyLineInputParameters(java.lang.String aAssemblyLineName)
throws DIException,
java.rmi.RemoteException
getAssemblyLineInputParameters in interface ConfigInstanceaAssemblyLineName - the name of the AssemblyLine.
DIException - if an error occurs while getting the AssemblyLine's input
parameters.
java.rmi.RemoteException - if a communication-related exception occurs.
public SchemaConfig getAssemblyLineOutputParameters(java.lang.String aAssemblyLineName)
throws DIException,
java.rmi.RemoteException
getAssemblyLineOutputParameters in interface ConfigInstanceaAssemblyLineName - the name of the AssemblyLine.
DIException - if an error occurs while getting the AssemblyLine's output
parameters.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine[] getAssemblyLines()
throws DIException,
java.rmi.RemoteException
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");
}
getAssemblyLines in interface ConfigInstanceDIException - if an error occurs while getting the AssemblyLines.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName)
throws DIException,
java.rmi.RemoteException
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");
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - The name of the AssemblyLine.
DIException - if an error occurs when starting the AssemblyLine.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
boolean aSync)
throws DIException,
java.rmi.RemoteException
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);
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData)
throws DIException,
java.rmi.RemoteException
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");
}
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - The name of the AssemblyLine.aInputData - Initial Work Entry to run the AssemblyLine with.
DIException - if an error occurs when starting the AssemblyLine.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
boolean aSync)
throws DIException,
java.rmi.RemoteException
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");
}
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs)
throws DIException,
java.rmi.RemoteException
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs,
boolean aSync)
throws DIException,
java.rmi.RemoteException
When the AssemblyLine is started synchronously it waits the current thread to die and starts after that.
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
Entry aInputData,
AssemblyLineListener aListener,
boolean aGetLogs,
boolean aSync,
boolean aGetEntryOnEachCycle)
throws DIException,
java.rmi.RemoteException
When the AssemblyLine is started synchronously it waits the current thread to die and starts after that.
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLineHandler startAssemblyLineManual(java.lang.String aAssemblyLineName,
Entry aInputData)
throws DIException,
java.rmi.RemoteException
startAssemblyLineManual in interface ConfigInstanceaAssemblyLineName - The name of the AssemblyLine.aInputData - Initial Work Entry to run the AssemblyLine with.
DIException - if an error occurs when starting the AssemblyLine.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
TaskCallBlock aTcb)
throws DIException,
java.rmi.RemoteException
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - The name of the AssemblyLine.aTcb - The TaskCallBlock object to start the AL with.
DIException - if an error occurs when starting the AssemblyLine.
java.rmi.RemoteException - if a communication-related exception occurs.
public AssemblyLine startAssemblyLine(java.lang.String aAssemblyLineName,
TaskCallBlock aTcb,
boolean aSync)
throws DIException,
java.rmi.RemoteException
startAssemblyLine in interface ConfigInstanceaAssemblyLineName - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public void reload()
throws DIException,
java.rmi.RemoteException
reload in interface ConfigInstanceDIException - if an error occurs while reloading the server.
java.rmi.RemoteException - if a communication-related exception occurs.
public void stop()
throws DIException,
java.rmi.RemoteException
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");
}
stop in interface ConfigInstanceDIException - if an error occurs while stopping.
java.rmi.RemoteException - if a communication-related exception occurs.
public void stop(boolean sync)
throws DIException,
java.rmi.RemoteException
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");
}
stop in interface ConfigInstancesync - If true, creates new Threads on the server to do the waiting.
DIException - if an error occurs while stopping.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String[] getALLogFileNames(java.lang.String aALName)
throws DIException,
java.rmi.RemoteException
getALLogFileNames in interface ConfigInstanceaALName - the name of the AssemblyLine.
DIException - if an error occurs while obtaining AssemblyLine's log file
names.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getALLastLogFileName(java.lang.String aALName)
throws DIException,
java.rmi.RemoteException
getALLastLogFileName in interface ConfigInstanceaALName - the name of the AssemblyLine.
DIException - if an error occurs while obtaining the log file name.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getALLog(java.lang.String aALName,
java.lang.String aLogFileName)
throws DIException,
java.rmi.RemoteException
getALLog in interface ConfigInstanceaALName - 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.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getALLogLastChunk(java.lang.String aALName,
java.lang.String aLogFileName,
int aKilobytes)
throws DIException,
java.rmi.RemoteException
getALLogLastChunk in interface ConfigInstanceaALName - 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.rmi.RemoteException - if a communication-related exception occurs.
public java.util.Date getInstanceBootTime()
throws DIException,
java.rmi.RemoteException
getInstanceBootTime in interface ConfigInstancejava.util.Date specifying the date and time the
instance was started.
DIException - if an error occurs while retrieving instance's boot time.
java.rmi.RemoteException - if a communication-related exception occurs.
public void saveConfiguration()
throws DIException,
java.rmi.RemoteException
saveConfiguration in interface ConfigInstanceDIException
java.rmi.RemoteException
public void saveConfiguration(boolean aEncrypt)
throws DIException,
java.rmi.RemoteException
saveConfiguration in interface ConfigInstanceDIException
java.rmi.RemoteException
public ExternalPropertiesConfig getExternalProperties()
throws DIException,
java.rmi.RemoteException
getExternalProperties in interface ConfigInstanceDIException - if an error occurs while getting the external properties.
java.rmi.RemoteException - if a communication-related exception occurs.
public ExternalPropertiesConfig getExternalProperties(java.lang.String aKey)
throws DIException,
java.rmi.RemoteException
getExternalProperties in interface ConfigInstanceaKey - The external property object name.
DIException - if an error occurs while getting the external properties.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String[] getExternalPropertiesKeys()
throws DIException,
java.rmi.RemoteException
getExternalPropertiesKeys in interface ConfigInstanceDIException - if an error occurs while getting the external properties
names.
java.rmi.RemoteException - if a communication-related exception occurs.
public void setExternalProperties(ExternalPropertiesConfig aExPropConfig)
throws DIException,
java.rmi.RemoteException
setExternalProperties in interface ConfigInstanceDIException
java.rmi.RemoteException
public void setExternalProperties(java.lang.String aKey,
ExternalPropertiesConfig aExPropConfig)
throws DIException,
java.rmi.RemoteException
setExternalProperties in interface ConfigInstanceDIException
java.rmi.RemoteException
public void saveExternalProperties()
throws DIException,
java.rmi.RemoteException
saveExternalProperties in interface ConfigInstanceDIException
java.rmi.RemoteException
public static ConfigInstanceImpl createInstance(ConfigInstance aLocalConfigInstance,
SessionImpl aSession)
throws DIException,
java.rmi.RemoteException
aLocalConfigInstance - local config instanceaSession - the SessionImpl object
DIException - if error occurred while creating instance.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getGlobalUniqueID()
throws DIException,
java.rmi.RemoteException
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");
}
getGlobalUniqueID in interface ConfigInstanceDIException - if an error occurs while retrieving Config Instance GUID
value.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String[] getConnectorPoolNames()
throws DIException,
java.rmi.RemoteException
getConnectorPoolNames in interface ConfigInstanceDIException - if an error occurs while retrieving Connector Pool names.
java.rmi.RemoteException - if a communication-related exception occurs.
public int getConnectorPoolSize(java.lang.String aConnectorPoolName)
throws DIException,
java.rmi.RemoteException
getConnectorPoolSize in interface ConfigInstanceaConnectorPoolName - the name of the Connector Pool.
DIException - if an error occurs while retrieving the size of the specified
Connector Pool.
java.rmi.RemoteException - if a communication-related exception occurs.
public int getConnectorPoolFreeNum(java.lang.String aConnectorPoolName)
throws DIException,
java.rmi.RemoteException
getConnectorPoolFreeNum in interface ConfigInstanceaConnectorPoolName - the name of the Connector Pool.
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.
public PoolDefConfig getConnectorPoolConfig(java.lang.String aConnectorPoolName)
throws DIException,
java.rmi.RemoteException
getConnectorPoolConfig in interface ConfigInstanceaConnectorPoolName - the name of the Connector Pool.
DIException - if an error occurs while retrieving Connector Pool
configuration object.
java.rmi.RemoteException - if a communication-related exception occurs.
public int purgeConnectorPool(java.lang.String aConnectorPoolName)
throws DIException,
java.rmi.RemoteException
purgeConnectorPool in interface ConfigInstanceaConnectorPoolName - the name of the Connector Pool.
DIException - if an error occurs while shrinking the Connector Pool.
java.rmi.RemoteException - if a communication-related exception occurs.
public TDIProperties getTDIProperties()
throws java.lang.Exception,
java.rmi.RemoteException
getTDIProperties in interface ConfigInstancejava.lang.Exception - if an error occurs while retrieving TDIProperties object.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getConfigPath()
throws java.rmi.RemoteException
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");
}
getConfigPath in interface ConfigInstancejava.rmi.RemoteException - if a communication-related exception occurs.
public java.lang.String getConfigurationFile()
throws DIException,
java.rmi.RemoteException
ConfigInstanceSession.listAllConfigurations() would return. It could be either
a solution name or a path relative to the base config folder.
getConfigurationFile in interface ConfigInstanceDIException - if an error occurs while retrieving configuration file
reference
java.rmi.RemoteException - if a communication-related exception occurs.
public void addLogListener(LogListener listener)
throws DIException,
java.rmi.RemoteException
addLogListener in interface ConfigInstancelistener - Listener for logged messages.
DIException - If an error occurs during registration, e.g. the listener is
null.
java.rmi.RemoteException - If a communication-related exception occurs.ConfigInstance.removeLogListener(LogListener)
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.
removeLogListener in interface ConfigInstancelistener - Registered listener.
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.ConfigInstance.addLogListener(LogListener)
public Sequence startSequence(java.lang.String name)
throws DIException,
java.rmi.RemoteException
ConfigInstanceExample:
var ci = session.getConfigInstance("C__Documents and Settings_username_My Documents_TDI_rs.xml");
var seq = ci.startSequence("csv2xml");//Sequence is started
startSequence in interface ConfigInstancename - The name of the Sequence.
DIException - if an error occurs when starting the Sequence.
java.rmi.RemoteException - if a communication-related exception occurs.
public Sequence startSequence(java.lang.String name,
TaskCallBlock tcb,
boolean sync)
throws DIException,
java.rmi.RemoteException
ConfigInstanceExample:
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
startSequence in interface ConfigInstancename - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public Sequence startSequence(java.lang.String name,
TaskCallBlock tcb,
AssemblyLineListener listener)
throws DIException,
java.rmi.RemoteException
ConfigInstance
startSequence in interface ConfigInstancename - 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.
java.rmi.RemoteException - if a communication-related exception occurs.
public java.util.Map<java.lang.String,java.lang.Object> getSchedulerInfo(java.lang.String name)
throws java.rmi.RemoteException
ConfigInstance
getSchedulerInfo in interface ConfigInstancename - - Name of Scheduler
java.rmi.RemoteExceptionScheduler.getInfo();
public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getSchedulersInfo()
throws java.rmi.RemoteException
ConfigInstance
getSchedulersInfo in interface ConfigInstancejava.rmi.RemoteExceptionScheduler.getInfo();public void unreferenced()
unreferenced in interface java.rmi.server.Unreferenced
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||