|
||||||||||
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.AssemblyLineImpl
public class AssemblyLineImpl
Implements an AssemblyLine instance.
Field Summary |
---|
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
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. |
static AssemblyLineImpl |
createInstance(AssemblyLine aLocalAssemblyLine,
SessionImpl aSession)
Creates new instance of this class. |
void |
detachDebugger(java.lang.Object msg)
Detach the current debugger from the AssemblyLine. |
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 weather 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 connectig/interacting to/with. |
void |
stop()
Stops the execution of the AssemblyLine. |
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 ConfigInstance getConfigInstance() 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 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()); } else { main.logmsg("No Remote Assembly Lines Running"); }
getConfigInstance
in interface AssemblyLine
DIException
- if an error occurs while retrieving the configuration
instance information.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getName() 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 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()); } else { main.logmsg("No Remote Assembly Lines Running"); }
getName
in interface AssemblyLine
DIException
- if an error occurs while retrieving the name of the
AssemblyLine.
java.rmi.RemoteException
- if a communication-related exception occurs.public int getUniqueCode() throws DIException, java.rmi.RemoteException
Example
var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var remALListener = new com.ibm.di.admin.remote.RemoteALListener(remoteSession, false); var runningAL = session.getAssemblyLines()[0]; remALListener.setCode(runningAL.getUniqueCode());
getUniqueCode
in interface AssemblyLine
DIException
- if an error occurs while retrieving the unique code of the
AssemblyLine.
java.rmi.RemoteException
- if a communication-related exception occurs.public AssemblyLineConfig getConfig() throws DIException, java.rmi.RemoteException
getConfig
in interface AssemblyLine
DIException
- if an error occurs while retrieving the configuration
information of the AssemblyLine.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getNullBehavior() throws DIException, java.rmi.RemoteException
getNullBehavior
in interface AssemblyLine
DIException
- if an error occurs while getting the nullBehavior attribute.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getNullBehaviorValue() throws DIException, java.rmi.RemoteException
getNullBehaviorValue
in interface AssemblyLine
DIException
- if an error occurs while getting the nullBehaviorValue
attribute.
java.rmi.RemoteException
- if a communication-related exception occurs.public TaskStatistics getStatistics() throws DIException, java.rmi.RemoteException
Example
var runningALs = null; var stats = null; var result = null; var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var runningConfigs = remoteSession.getConfigInstances(); if (runningConfigs != null) { 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(); } } } } else { main.logmsg("No remote config instances available"); }
getStatistics
in interface AssemblyLine
DIException
- if an error occurs while getting the AssemblyLine statistics.
java.rmi.RemoteException
- if a communication-related exception occurs.public boolean isActive() throws DIException, java.rmi.RemoteException
Example
var runningALs = null; var stats = null; var result = null; var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var runningConfigs = remoteSession.getConfigInstances(); if (runningConfigs != null) { 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(); } } } } else { main.logmsg("No remote config instances available"); }
isActive
in interface AssemblyLine
DIException
- if an error occurs while getting the AssemblyLine state.
java.rmi.RemoteException
- if a communication-related exception occurs.public Entry getResult() throws DIException, java.rmi.RemoteException
Example
var runningALs = null; var stats = null; var result = null; var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var runningConfigs = remoteSession.getConfigInstances(); if (runningConfigs != null) { 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(); } } } } else { main.logmsg("No remote config instances available"); }
getResult
in interface AssemblyLine
DIException
- if an error occurs while getting the result Entry.
java.rmi.RemoteException
- if a communication-related exception occurs.public void stop() throws DIException, java.rmi.RemoteException
Example
var runningALs = null; var stats = null; var result = null; var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var runningConfigs = remoteSession.getConfigInstances(); if (runningConfigs != null) { 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(); } } } } else { main.logmsg("No remote config instances available"); }
stop
in interface AssemblyLine
DIException
- if an error occurs while stopping the AssemblyLine.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getSystemLogFilePath() throws DIException, java.rmi.RemoteException
getSystemLogFilePath
in interface AssemblyLine
DIException
- if an error occurs while obtaining AssemblyLine log file
path.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getSystemLogFileName() throws DIException, java.rmi.RemoteException
getSystemLogFileName
in interface AssemblyLine
DIException
- if an error occurs while obtaining AssemblyLine log file
name.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getSystemLog() throws DIException, java.rmi.RemoteException
getSystemLog
in interface AssemblyLine
DIException
- if an error occurs while obtaining AssemblyLine's log.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getSystemLogLastChunk(int aLastKilobytes) throws DIException, java.rmi.RemoteException
getSystemLogLastChunk
in interface AssemblyLine
aLastKilobytes
- 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 static AssemblyLineImpl createInstance(AssemblyLine aLocalAssemblyLine, SessionImpl aSession) throws DIException, java.rmi.RemoteException
aLocalAssemblyLine
- local assembly lineaSession
- the SessionImpl object
DIException
- if error occurs while creating instance.
java.rmi.RemoteException
- if a communication-related exception occurs.public java.lang.String getGlobalUniqueID() throws DIException, java.rmi.RemoteException
Example
var runningALs = null; var stats = null; var result = null; var sessionFactory = java.rmi.Naming .lookup("rmi://127.0.0.1:1099/SessionFactory"); var remoteSession = sessionFactory.createSession(); var runningConfigs = remoteSession.getConfigInstances(); if (runningConfigs != null) { 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(); } } } } else { main.logmsg("No remote config instances available"); }
getGlobalUniqueID
in interface AssemblyLine
DIException
- if an error occurs while obtaining the AssemblyLine GUID
value.
java.rmi.RemoteException
- if a communication-related exception occurs.public boolean isSimulating() throws DIException, java.rmi.RemoteException
isSimulating
in interface AssemblyLine
DIException
- if an error occurs while obtaining the simulation state
java.rmi.RemoteException
- if connection error occurs.public void setSimulating(boolean simulate) throws DIException, java.rmi.RemoteException
setSimulating
in interface AssemblyLine
simulate
- true switches the simulation on, false switches it off
DIException
- if an error occurs while changing the simulation state
java.rmi.RemoteException
- if connection error occurs.public void addListener(AssemblyLineListener listener, boolean getLogs, boolean getEntryOnEachCycle) throws DIException, java.rmi.RemoteException
addListener
in interface AssemblyLine
listener
- 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.
java.rmi.RemoteException
- if connection error occurs.AssemblyLine.removeListener(AssemblyLineListener)
public void removeListener(AssemblyLineListener listener) throws DIException, java.rmi.RemoteException
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 AssemblyLine
listener
- The listener that needs to be removed.
DIException
- if the listener cannot be unregistered.
java.rmi.RemoteException
- if connection error occurs.#addListener(AssemblyLineListener, boolean)
public void attachDebugger(int port, java.lang.String host, boolean onerror) throws DIException, java.rmi.RemoteException
attachDebugger
in interface AssemblyLine
port
- 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.
java.rmi.RemoteException
- If connection error occurs.public void detachDebugger(java.lang.Object msg) throws DIException, java.rmi.RemoteException
detachDebugger
in interface AssemblyLine
msg
- 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.
java.rmi.RemoteException
- If connection error occurs.public boolean getComponentDebugMode(java.lang.String componentName) throws DIException, java.rmi.RemoteException
AssemblyLine.getConfig()
.
getComponentDebugMode
in interface AssemblyLine
componentName
- 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.
java.rmi.RemoteException
- If connection error occurs.public void setComponentDebugMode(java.lang.String componentName, boolean debug) throws DIException, java.rmi.RemoteException
AssemblyLine.getConfig()
. If you run the same AssemblyLine
again it will use the settings from the configuration.
setComponentDebugMode
in interface AssemblyLine
componentName
- 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.
java.rmi.RemoteException
- If connection error occurs.AssemblyLine.getComponentDebugMode(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |