com.ibm.streams.operator.management
Class OperatorManagement
- java.lang.Object
-
- com.ibm.streams.operator.management.OperatorManagement
-
public class OperatorManagement extends java.lang.Object
Utility code for working with an operator's MXBeans.- Since:
- InfoSphere® Streams Version 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
OperatorManagement.Type
Enumeration of names for anObjectName
'stype
key property for MXBeans inSTREAMS_OPERATOR_JMX_DOMAIN
.
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
static java.lang.String
STREAMS_OPERATOR_JMX_DOMAIN
ObjectName domain for MXBeans registered in the platform MBeanServer of the executing processing element.
-
Method Summary
Methods Modifier and Type Method and Description static javax.management.ObjectName
getName(OperatorContext context)
static javax.management.ObjectName
getName(OperatorManagement.Type type, java.lang.String name)
Get theObjectName
for an MXBean inSTREAMS_OPERATOR_JMX_DOMAIN
.static OperatorContextMXBean
getOperatorContextMXBean(OperatorContext context)
Get a proxy to theOperatorContextMXBean
forcontext
.static javax.management.ObjectName
getOperatorSpecificName(java.lang.String operatorName, OperatorManagement.Type type, java.lang.String name, java.util.Hashtable<java.lang.String,java.lang.String> properties)
Get theObjectName
for an MXBean specific to a named operator.static javax.management.ObjectName
getPEName()
Get theObjectName
for automatically registeredProcessingElementMXBean
.static ProcessingElementMXBean
getProcessingElementMXBean()
Get a proxy to theProcessingElementMXBean
registered for the current Processing Element.
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
STREAMS_OPERATOR_JMX_DOMAIN
public static final java.lang.String STREAMS_OPERATOR_JMX_DOMAIN
ObjectName domain for MXBeans registered in the platform MBeanServer of the executing processing element. Set to "com.ibm.streams.operator".- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public static javax.management.ObjectName getName(OperatorManagement.Type type, java.lang.String name) throws javax.management.MalformedObjectNameException
Get theObjectName
for an MXBean inSTREAMS_OPERATOR_JMX_DOMAIN
.- Parameters:
type
- Type of the MXBean for thetype
key property.name
- Name of the MXBean for thename
key property. if null then noname
key property will be added.- Returns:
ObjectName
fortype
andname
.- Throws:
javax.management.MalformedObjectNameException
- Invalid name syntax.
-
getOperatorSpecificName
public static javax.management.ObjectName getOperatorSpecificName(java.lang.String operatorName, OperatorManagement.Type type, java.lang.String name, java.util.Hashtable<java.lang.String,java.lang.String> properties) throws javax.management.MalformedObjectNameException
Get theObjectName
for an MXBean specific to a named operator. TheObjectName
key propertiesoperator, type
andname
are set from the parametersoperatorName, type
andname
respectively.- Parameters:
operatorName
- Name of the operatortype
- Type of the MXBean, if null then it is ignored.name
- Name of the MXBean, if null then it is ignored.properties
- Arbitrary name value pairs to include inObjectName
.- Returns:
ObjectName
specific to the named operator.- Throws:
javax.management.MalformedObjectNameException
- Invalid name syntax.
-
getName
public static javax.management.ObjectName getName(OperatorContext context)
- Parameters:
context
- Context for the operator.- Returns:
ObjectName
for the operator
-
getPEName
public static javax.management.ObjectName getPEName()
Get theObjectName
for automatically registeredProcessingElementMXBean
.- Returns:
ObjectName
for the operator
-
getOperatorContextMXBean
public static OperatorContextMXBean getOperatorContextMXBean(OperatorContext context)
Get a proxy to theOperatorContextMXBean
forcontext
. The MXBean proxy is obtained using:JMX.newMXBeanProxy( ManagementFactory.getPlatformMBeanServer(), OperatorManagement.getName(context), OperatorContextMXBean.class, true);
The returned proxy will implementNotificationEmitter
.- Parameters:
context
-- Returns:
- Proxy to the
OperatorContextMXBean
forcontext
. - Since:
- InfoSphere® Streams Version 3.1
-
getProcessingElementMXBean
public static ProcessingElementMXBean getProcessingElementMXBean()
Get a proxy to theProcessingElementMXBean
registered for the current Processing Element. The MXBean proxy is obtained using:JMX.newMXBeanProxy( ManagementFactory.getPlatformMBeanServer(), OperatorManagement.getPEName(), ProcessingElementMXBean.class, true);
The returned proxy will implementNotificationEmitter
.- Returns:
- Proxy to
ProcessingElementMXBean
. - Since:
- InfoSphere® Streams Version 3.1
-
-