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
    • Field Detail

      • 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 the ObjectName for an MXBean in STREAMS_OPERATOR_JMX_DOMAIN.
        Parameters:
        type - Type of the MXBean for the type key property.
        name - Name of the MXBean for the name key property. if null then no name key property will be added.
        Returns:
        ObjectName for type and name.
        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 the ObjectName for an MXBean specific to a named operator. The ObjectName key properties operator, type and name are set from the parameters operatorName, type and name respectively.
        Parameters:
        operatorName - Name of the operator
        type - 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 in ObjectName.
        Returns:
        ObjectName specific to the named operator.
        Throws:
        javax.management.MalformedObjectNameException - Invalid name syntax.
      • getName

        public static javax.management.ObjectName getName(OperatorContext context)
        Get the ObjectName for automatically registered OperatorContextMXBean for the OperatorContext.
        Parameters:
        context - Context for the operator.
        Returns:
        ObjectName for the operator
      • getPEName

        public static javax.management.ObjectName getPEName()
        Get the ObjectName for automatically registered ProcessingElementMXBean.
        Returns:
        ObjectName for the operator
      • getOperatorContextMXBean

        public static OperatorContextMXBean getOperatorContextMXBean(OperatorContext context)
        Get a proxy to the OperatorContextMXBean for context. The MXBean proxy is obtained using:
         
               JMX.newMXBeanProxy(
                        ManagementFactory.getPlatformMBeanServer(),
                        OperatorManagement.getName(context),
                        OperatorContextMXBean.class,
                        true);
         
         

        The returned proxy will implement NotificationEmitter.
        Parameters:
        context -
        Returns:
        Proxy to the OperatorContextMXBean for context.
        Since:
        InfoSphere® Streams Version 3.1
      • getProcessingElementMXBean

        public static ProcessingElementMXBean getProcessingElementMXBean()
        Get a proxy to the ProcessingElementMXBean 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 implement NotificationEmitter.
        Returns:
        Proxy to ProcessingElementMXBean.
        Since:
        InfoSphere® Streams Version 3.1