|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.di.api.jmx.mbeans.BaseAdmin
com.ibm.di.api.jmx.mbeans.AssemblyLine
public class AssemblyLine
Represents an AssemblyLine instance.
| Field Summary | |
|---|---|
static java.lang.String |
MBEAN_TYPE
Type of the MBean. |
| Constructor Summary | |
|---|---|
AssemblyLine(AssemblyLine aAssemblyLine)
Class constructor |
|
| Method Summary | |
|---|---|
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 javax.management.ObjectName |
genObjectName(java.lang.String aAssemblyLineName,
int aUniqueCode)
Generates object name for specified assembly line. |
AssemblyLineConfig |
getConfig()
Returns configuration information about the AssemblyLine. |
javax.management.ObjectName |
getConfigInstance()
Returns ObjectName generated from the AssemblyLine’s configuration ID, gotten from the AssemblyLine’s configuration instance. |
java.lang.String |
getGlobalUniqueID()
Returns AssemblyLine GUID. |
java.lang.String |
getId()
Reads attribute "Id". |
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(java.lang.Integer aLastKilobytes)
Retrieves the last chunk from the current AssemblyLine's system log. |
java.lang.String |
getType()
Reads attribute "Type". |
java.lang.Integer |
getUniqueCode()
Returns the unique code of the AssemblyLine. |
java.lang.Boolean |
isActive()
Checks if the AssemblyLine is active. |
boolean |
isSimulating()
Check weather the AssemblyLine is simulating or not. |
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. |
| Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin |
|---|
getCurrentUserId, getKeyPropertyList |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MBEAN_TYPE
| Constructor Detail |
|---|
public AssemblyLine(AssemblyLine aAssemblyLine)
throws DIException
aAssemblyLine - assembly line to set.
DIException - DIException if an error occurs while retrieving the name of
the AssemblyLine.| Method Detail |
|---|
public java.lang.String getType()
getType() and getId() 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".
getType in interface BaseMBeanpublic java.lang.String getId()
getType() and getId() 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 in interface BaseMBean
public javax.management.ObjectName getConfigInstance()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getConfigInstance in interface AssemblyLineMBeanDIException - if an error occurs while generating the ObjectName.
public java.lang.String getName()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getName in interface AssemblyLineMBeanDIException - if an error occurs while retrieving the name of the
AssemblyLine.
public java.lang.Integer getUniqueCode()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getUniqueCode in interface AssemblyLineMBeanDIException - if an error occurs while retrieving the unique code of the
AssemblyLine.
public AssemblyLineConfig getConfig()
throws DIException
getConfig in interface AssemblyLineMBeanDIException - if an error occurs while retrieving the configuration
information of the AssemblyLine.
public java.lang.String getNullBehavior()
throws DIException
getNullBehavior in interface AssemblyLineMBeanDIException - if an error occurs while getting the nullBehavior attribute.
public java.lang.String getNullBehaviorValue()
throws DIException
getNullBehaviorValue in interface AssemblyLineMBeanDIException - if an error occurs while getting the nullBehaviorValue
attribute.
public TaskStatistics getStatistics()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getStatistics in interface AssemblyLineMBeanDIException - if an error occurs while getting the AssemblyLine statistics.
public java.lang.Boolean isActive()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
isActive in interface AssemblyLineMBeanDIException - if an error occurs while getting the AssemblyLine state.
public Entry getResult()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getResult in interface AssemblyLineMBeanDIException - if an error occurs while getting the result Entry.
public void stop()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
stop in interface AssemblyLineMBeanDIException - if an error occurs while stopping the AssemblyLine.
public java.lang.String getSystemLogFilePath()
throws DIException
getSystemLogFilePath in interface AssemblyLineMBeanDIException - if an error occurs while obtaining AssemblyLine log file
path.
public java.lang.String getSystemLogFileName()
throws DIException
getSystemLogFileName in interface AssemblyLineMBeanDIException - if an error occurs while obtaining AssemblyLine log file
name.
public java.lang.String getSystemLog()
throws DIException
getSystemLog in interface AssemblyLineMBeanDIException - if an error occurs while obtaining AssemblyLine's log.
public java.lang.String getSystemLogLastChunk(java.lang.Integer aLastKilobytes)
throws DIException
getSystemLogLastChunk in interface AssemblyLineMBeanaLastKilobytes - 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 static javax.management.ObjectName genObjectName(java.lang.String aAssemblyLineName,
int aUniqueCode)
throws DIException
aAssemblyLineName - the name of the assembly line.aUniqueCode - unique code used for building the AssemblyLine MBean id.
DIException - if error occurs while creating AssemblyLine JMX object name.
public java.lang.String getGlobalUniqueID()
throws DIException
Example
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();
//for local access use:
//MBeanServer jmxMBeanServer = com.ibm.di.api.jmx.JMXAgent.getMBeanServer();
var mBeans = jmxMBeanServer.queryMBeans(null, null).iterator();
while (mBeans.hasNext()) {
ALMBean = mBeans.next();
if (ALMBean.getClassName().equals("com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
break;
}
}
if (ALMBean instanceof javax.management.ObjectInstance
&& ALMBean.getClassName().equals(
"com.ibm.di.api.jmx.mbeans.AssemblyLine")) {
// the method getConfigInstance() cannot be invoked with the invoke() method because it contains "get" in front.
// Instead, for methods that have "get" in front, use getAttribute() and the name of the property
// in this case getConfigInstance method transforms to ConfigInstance property
var mConfigInstance = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"ConfigInstance");
task.logmsg("Config Instance: " + mConfigInstance);
var mGlobalUniqueID = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"GlobalUniqueID");
task.logmsg("Global Unique ID: " + mGlobalUniqueID);
var mName = jmxMBeanServer.getAttribute(ALMBean.getObjectName(), "Name");
task.logmsg("Name: " + mName);
var mResult = jmxMBeanServer
.getAttribute(ALMBean.getObjectName(), "Result");
task.logmsg("Result: " + mResult);
var mStatistics = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"Statistics");
task.logmsg("Statistics: " + mStatistics);
var mUniqueCode = jmxMBeanServer.getAttribute(ALMBean.getObjectName(),
"UniqueCode");
task.logmsg("UniqueCode: " + mUniqueCode);
var isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (isActive) {
jmxMBeanServer.invoke(ALMBean.getObjectName(), "stop", null, null);
isActive = jmxMBeanServer.invoke(ALMBean.getObjectName(), "isActive",
null, null);
if (!isActive) {
task.logmsg("Assembly Line successfully stopped.");
}
}
} else {
task.logmsg("No Assembly Lines found");
}
getGlobalUniqueID in interface AssemblyLineMBeanDIException - if an error occurs while obtaining the GUID.
public boolean isSimulating()
throws DIException
DIException - if an error occurs while obtaining the simulation state
public void setSimulating(boolean simulate)
throws DIException
simulate - true switches the simulation on, false switches it off
DIException - if an error occurs while changing the simulation state
public void attachDebugger(int port,
java.lang.String host,
boolean onerror)
throws DIException
attachDebugger in interface AssemblyLineMBeanport - 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 AssemblyLineMBeanmsg - 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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||