|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.api.local.impl.AssemblyLineImpl
public class AssemblyLineImpl
Implements an AssemblyLine instance.
| Constructor Summary | |
|---|---|
AssemblyLineImpl(AssemblyLine aAssemblyLine,
ConfigInstanceImpl aConfigInstance,
SessionImpl aSession)
Class constructor. |
|
| Method Summary | |
|---|---|
void |
addListener(AssemblyLineListener listener,
boolean getLogs,
boolean getEntryOnEachCycle)
Register a listener for AssemblyLine events. |
void |
attachDebugger(int port,
java.lang.String host,
boolean onerror)
Attach a debugger to the AssemblyLine. |
void |
detachDebugger(java.lang.Object msg)
Detach the current debugger from the AssemblyLine. |
static java.lang.String |
genGUID(AssemblyLine aAssemblyLine)
Generates unique GUID for a specified assembly line. |
boolean |
getComponentDebugMode(java.lang.String componentName)
Query the debug mode setting of the specified component (Connector or Function Component). |
AssemblyLineConfig |
getConfig()
Returns configuration information about the AssemblyLine. |
ConfigInstance |
getConfigInstance()
Returns the configuration instance of the AssemblyLine. |
java.lang.String |
getGlobalUniqueID()
Returns AssemblyLine GUID. |
java.lang.String |
getName()
Returns the name of the AssemblyLine. |
java.lang.String |
getNullBehavior()
Gets the nullBehavior attribute of the AssemblyLine object |
java.lang.String |
getNullBehaviorValue()
Gets the nullBehaviorValue attribute of the AssemblyLine object. |
Entry |
getResult()
This method returns the result entry object. |
TaskStatistics |
getStatistics()
This method returns the TaskStatistics object for this AssemblyLine. |
java.lang.String |
getSystemLog()
Retrieves the current AssemblyLine's system log. |
java.lang.String |
getSystemLogFileName()
Returns the name of the log file of the AssemblyLine (not prefixed by folders path). |
java.lang.String |
getSystemLogFilePath()
Returns the fully-qualified path of the log file of the AssemblyLine. |
java.lang.String |
getSystemLogLastChunk(int aLastKilobytes)
Retrieves the last chunk from the current AssemblyLine's system log. |
int |
getUniqueCode()
Returns the unique code of the AssemblyLine. |
boolean |
isActive()
Checks if the AssemblyLine is active. |
boolean |
isSimulating()
Check whether the AssemblyLine is simulating or not |
void |
removeListener(AssemblyLineListener listener)
Unregister a listener for AssemblyLine events. |
void |
setComponentDebugMode(java.lang.String componentName,
boolean debug)
Modify the debug mode setting of the specified component (Connector or Function Component). |
void |
setSimulating(boolean simulate)
Changes the way the AssemblyLine treats the target systems it is connecting/interacting to/with. |
void |
stop()
Stops the execution of the AssemblyLine. |
void |
stop(boolean sync)
Stops the execution of the AssemblyLine, and waits for it to stop. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AssemblyLineImpl(AssemblyLine aAssemblyLine,
ConfigInstanceImpl aConfigInstance,
SessionImpl aSession)
throws DIException
aAssemblyLine - AssemblyLine instanceaConfigInstance - ConfigInstanceImpl instanceaSession - SessionImpl instance
DIException - if any of the parameter is null| Method Detail |
|---|
public ConfigInstance getConfigInstance()
throws DIException
Example
var mAssemblyLine = session.getAssemblyLines()[0]; var mConfigInstance = mAssemblyLine.getConfigInstance(); var configId = mConfigInstance.getConfigId(); var aAssemblyLineName = "AssemblyLine"; var assemblyLine = mConfigInstance.startAssemblyLine(aAssemblyLineName); var objectName = com.ibm.di.api.jmx.mbeans.AssemblyLine.genObjectName(assemblyLine.getName(), assemblyLine.getUniqueCode());
getConfigInstance in interface AssemblyLineDIException - if an error occurs while retrieving the configuration
instance information.
public java.lang.String getName()
throws DIException
Example
var mAssemblyLine = session.getAssemblyLines()[0]; var mConfigInstance = mAssemblyLine.getConfigInstance(); var configId = mConfigInstance.getConfigId(); var aAssemblyLineName = "AssemblyLine"; var assemblyLine = mConfigInstance.startAssemblyLine(aAssemblyLineName); var objectName = com.ibm.di.api.jmx.mbeans.AssemblyLine.genObjectName(assemblyLine.getName(), assemblyLine.getUniqueCode());
getName in interface AssemblyLineDIException - if an error occurs while retrieving the name of the
AssemblyLine.
public int getUniqueCode()
throws DIException
Example
var mAssemblyLine = session.getAssemblyLines()[0]; var mConfigInstance = mAssemblyLine.getConfigInstance(); var configId = mConfigInstance.getConfigId(); var aAssemblyLineName = "AssemblyLine"; var assemblyLine = mConfigInstance.startAssemblyLine(aAssemblyLineName); var objectName = com.ibm.di.api.jmx.mbeans.AssemblyLine.genObjectName(assemblyLine.getName(), assemblyLine.getUniqueCode());
getUniqueCode in interface AssemblyLineDIException - if an error occurs while retrieving the unique code of the
AssemblyLine.
public AssemblyLineConfig getConfig()
throws DIException
getConfig in interface AssemblyLineDIException - if an error occurs while retrieving the configuration
information of the AssemblyLine.
public java.lang.String getNullBehavior()
throws DIException
getNullBehavior in interface AssemblyLineDIException - if an error occurs while getting the nullBehavior attribute.
public java.lang.String getNullBehaviorValue()
throws DIException
getNullBehaviorValue in interface AssemblyLineDIException - if an error occurs while getting the nullBehaviorValue
attribute.
public TaskStatistics getStatistics()
throws DIException
Example
var runningALs = null;
var stats = null;
var result = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
result = runningALs[j].getResult();
var attr = new com.ibm.di.entry.Attribute("LogURL", "/log/" + runningALs[j].getGlobalUniqueID());
runningALs[j].stop();
}
}
}
getStatistics in interface AssemblyLineDIException - if an error occurs while getting the AssemblyLine statistics.
public boolean isActive()
throws DIException
Example
var runningALs = null;
var stats = null;
var result = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
result = runningALs[j].getResult();
var attr = new com.ibm.di.entry.Attribute("LogURL", "/log/" + runningALs[j].getGlobalUniqueID());
runningALs[j].stop();
}
}
}
isActive in interface AssemblyLineDIException - if an error occurs while getting the AssemblyLine state.
public Entry getResult()
throws DIException
Example
var runningALs = null;
var stats = null;
var result = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
result = runningALs[j].getResult();
var attr = new com.ibm.di.entry.Attribute("LogURL", "/log/" + runningALs[j].getGlobalUniqueID());
runningALs[j].stop();
}
}
}
getResult in interface AssemblyLineDIException - if an error occurs while getting the result Entry.
public void stop()
throws DIException
Example
var runningALs = null;
var stats = null;
var result = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
result = runningALs[j].getResult();
var attr = new com.ibm.di.entry.Attribute("LogURL", "/log/" + runningALs[j].getGlobalUniqueID());
runningALs[j].stop();
}
}
}
stop in interface AssemblyLineDIException - if an error occurs while stopping the AssemblyLine.
public void stop(boolean sync)
throws DIException
Example
var stats = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
var runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
main.logmsg("Stopping [" + j + "]: " + runningALs[j].getName());
runningALs[j].stop(false);
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
}
}
}
stop in interface AssemblyLinesync - If true, create a new Thread to do the waiting.
DIException - if an error occurs while stopping the AssemblyLine.
public java.lang.String getSystemLogFilePath()
throws DIException
getSystemLogFilePath in interface AssemblyLineDIException - if an error occurs while obtaining AssemblyLine log file
path.
public java.lang.String getSystemLogFileName()
throws DIException
getSystemLogFileName in interface AssemblyLineDIException - if an error occurs while obtaining AssemblyLine log file
name.
public java.lang.String getSystemLog()
throws DIException
getSystemLog in interface AssemblyLineDIException - if an error occurs while obtaining AssemblyLine's log.
public java.lang.String getSystemLogLastChunk(int aLastKilobytes)
throws DIException
getSystemLogLastChunk in interface AssemblyLineaLastKilobytes - 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.public java.lang.String getGlobalUniqueID()
Example
var runningALs = null;
var stats = null;
var result = null;
var runningConfigs = session.getConfigInstances();
for (var i = 0; i < runningConfigs.length; i++) {
runningALs = runningConfigs[i].getAssemblyLines();
for (var j = 0; j < runningALs.length; j++) {
if (runningALs[j].isActive()) {
stats = runningALs[j].getStatistics().toString();
main.logmsg("statistics[" + j + "] = " + stats);
result = runningALs[j].getResult();
var attr = new com.ibm.di.entry.Attribute("LogURL", "/log/" + runningALs[j].getGlobalUniqueID());
runningALs[j].stop();
}
}
}
getGlobalUniqueID in interface AssemblyLinepublic static java.lang.String genGUID(AssemblyLine aAssemblyLine)
aAssemblyLine - the assembly line name
public boolean isSimulating()
throws DIException
isSimulating in interface AssemblyLineDIException - if an error occurs while obtaining the simulation state
public void setSimulating(boolean simulate)
throws DIException
setSimulating in interface AssemblyLinesimulate - true switches the simulation on, false switches it off
DIException - if an error occurs while changing the simulation state
public void addListener(AssemblyLineListener listener,
boolean getLogs,
boolean getEntryOnEachCycle)
throws DIException
addListener in interface AssemblyLinelistener - Listener for AssemblyLine events.getLogs - If true, the listener will receive logged messages.getEntryOnEachCycle - If true the listener will receive the current entry at each
AssemblyLine cycle's end.
DIException - If the listener cannot be registered.AssemblyLine.removeListener(AssemblyLineListener)
public void removeListener(AssemblyLineListener listener)
throws DIException
Unregister a listener for AssemblyLine events. 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 #addListener(AssemblyLineListener, boolean) method
on the same object.
Beware that the listener may get notified one more time after it was unregistered. The only way to ensure this does not happen is to unregister the listener in one of its callback methods.
removeListener in interface AssemblyLinelistener - The listener that needs to be removed.
DIException - If the listener cannot be unregistered.#addListener(AssemblyLineListener, boolean)
public void attachDebugger(int port,
java.lang.String host,
boolean onerror)
throws DIException
attachDebugger in interface AssemblyLineport - Port of the debugger.host - Host of the debugger.onerror - If true breakpoints are disabled except when there is an
error.
DIException - If the AssemblyLine is already being debugged or the
AssemblyLine cannot connect to the debugger.
public void detachDebugger(java.lang.Object msg)
throws DIException
detachDebugger in interface AssemblyLinemsg - This object will be sent to the debugger before the detaching
occurs. Must be serializable. If null, nothing will be sent.
DIException - If an error occurs while detaching the debugger.
public boolean getComponentDebugMode(java.lang.String componentName)
throws DIException
AssemblyLine.getConfig().
getComponentDebugMode in interface AssemblyLinecomponentName - The name of a Connector or a Function Component from this
AssemblyLine. Must be spelled exactly as it appears in the
configuration.
DIException - If an error occurs while querying the debug mode.
public void setComponentDebugMode(java.lang.String componentName,
boolean debug)
throws DIException
AssemblyLine.getConfig(). If you run the same AssemblyLine
again it will use the settings from the configuration.
setComponentDebugMode in interface AssemblyLinecomponentName - The name of a Connector or a Function Component from this
AssemblyLine.debug - The new debug mode of the component.
DIException - If an error occurs while setting the debug mode.AssemblyLine.getComponentDebugMode(String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||