ProcessingElement (Java Application API for IBM Streams)
Date: 2020-08-07

com.ibm.streamsx.rest

## Class ProcessingElement

- java.lang.Object
- - com.ibm.streamsx.rest.Element
  - - com.ibm.streamsx.rest.ProcessingElement

-     public class ProcessingElement
      extends Element

  An object describing an IBM Streams Processing Element

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProcessingElement()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getCurrentWorkingPath()` Gets the current working path of the processing element
    `java.lang.String` | `getHealth()` Gets the health indicator for this processing element
    `java.lang.String` | `getId()` Gets the id of this processing element
    `long` | `getIndexWithinJob()` Gets the index of this processing element within the `Job`
    `java.util.List<PEInputPort>` | `getInputPorts()` Gets a list of `processing element input ports` for this processing element
    `int` | `getLaunchCount()` Gets the number of times this processing element was started manually or automatically because of failures
    `java.util.List<Metric>` | `getMetrics()` Gets a list of `metrics` for this processing element
    `java.util.List<Operator>` | `getOperators()` Gets a list of `operators` for this processing element
    `java.lang.String` | `getOptionalConnections()` Gets the status of optional connections for this processing element.
    `java.util.List<java.lang.String>` | `getOsCapabilities()` Gets a list of the operating system capabilities
    `java.util.List<PEOutputPort>` | `getOutputPorts()` Gets a list of `processing element output ports` for this processing element
    `java.lang.String` | `getPendingTracingLevel()` Describes a pending change to the granularity of the trace information that is stored for this processing element.
    `java.lang.String` | `getProcessId()` Gets the operating system process ID for this processing element
    `boolean` | `getRelocatable()` Indicates whether or not this processing element can be relocated to a different resource
    `java.lang.String` | `getRequiredConnections()` Status of the required connections for this processing element.
    `ResourceAllocation` | `getResourceAllocation()` Gets the `resource allocation` for this processing element.
    `java.util.List<java.lang.String>` | `getResourceTags()` Gets a list of resource tags for this processing element
    `java.lang.String` | `getResourceType()` Identifies the REST resource type
    `boolean` | `getRestartable()` Indicates whether or not this processing element can be restarted
    `java.lang.String` | `getStatus()` Gets the status of this processing element
    `java.lang.String` | `getStatusReason()` Gets additional status for this processing element
    `java.lang.String` | `getTracingLevel()` Gets the granularity of the tracing level for this processing element

    - ### Methods inherited from class com.ibm.streamsx.rest.Element

      `getStreamsConnection, refresh, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ProcessingElement

          public ProcessingElement()

  - ### Method Detail

    - #### getMetrics

          public java.util.List<Metric> getMetrics()
                                            throws java.io.IOException

      Gets a list of `metrics` for this processing element
      Returns:
        List of `IBM Streams Metrics`
      Throws:
        `java.io.IOException`

    - #### getInputPorts

          public java.util.List<PEInputPort> getInputPorts()
                                                    throws java.io.IOException

      Gets a list of `processing element input ports` for this processing element
      Returns:
        List of `Processing Element Input Ports`
      Throws:
        `java.io.IOException`

    - #### getOperators

          public java.util.List<Operator> getOperators()
                                                throws java.io.IOException

      Gets a list of `operators` for this processing element
      Returns:
        List of `IBM Streams Operators`
      Throws:
        `java.io.IOException`

    - #### getOutputPorts

          public java.util.List<PEOutputPort> getOutputPorts()
                                                      throws java.io.IOException

      Gets a list of `processing element output ports` for this processing element
      Returns:
        List of `Processing Element Output Ports`
      Throws:
        `java.io.IOException`

    - #### getCurrentWorkingPath

          public java.lang.String getCurrentWorkingPath()

      Gets the current working path of the processing element
      Returns:
        the current working path

    - #### getHealth

          public java.lang.String getHealth()

      Gets the health indicator for this processing element
      Returns:
        the health indicator that contains one of the following values:
        - healthy
        - partiallyHealthy
        - partiallyUnhealthy
        - unhealthy
        - unknown

    - #### getId

          public java.lang.String getId()

      Gets the id of this processing element
      Returns:
        the processing element id

    - #### getIndexWithinJob

          public long getIndexWithinJob()

      Gets the index of this processing element within the `Job`
      Returns:
        processing element index as a long

    - #### getLaunchCount

          public int getLaunchCount()

      Gets the number of times this processing element was started manually or automatically because of failures
      Returns:
        number of times the processing element was started as an int

    - #### getOptionalConnections

          public java.lang.String getOptionalConnections()

      Gets the status of optional connections for this processing element.
      Returns:
        the optional connection status that contains one of the following values:
        - connected
        - disconnected
        - partiallyConnected
        - unknown

    - #### getOsCapabilities

          public java.util.List<java.lang.String> getOsCapabilities()

      Gets a list of the operating system capabilities
      Returns:
        List of the operating system capabilities

    - #### getPendingTracingLevel

          public java.lang.String getPendingTracingLevel()

      Describes a pending change to the granularity of the trace information that is stored for this processing element.
      Returns:
        the pending trace level change that contains one of the following values:
        - off
        - debug
        - error
        - trace
        a null value indicates no pending change to the trace level

    - #### getProcessId

          public java.lang.String getProcessId()

      Gets the operating system process ID for this processing element
      Returns:
        the operating sytem process ID

    - #### getRelocatable

          public boolean getRelocatable()

      Indicates whether or not this processing element can be relocated to a different resource
      Returns:
        boolean indicating whether or not relocation is possible

    - #### getRequiredConnections

          public java.lang.String getRequiredConnections()

      Status of the required connections for this processing element.
      Returns:
        required connection status that contains one of the following values:
        - connected
        - disconnected
        - partiallyConnected
        - unknown

    - #### getResourceTags

          public java.util.List<java.lang.String> getResourceTags()

      Gets a list of resource tags for this processing element
      Returns:
        List of resource tags

    - #### getResourceType

          public java.lang.String getResourceType()

      Identifies the REST resource type
      Returns:
        "pe"

    - #### getRestartable

          public boolean getRestartable()

      Indicates whether or not this processing element can be restarted
      Returns:
        the restart indicator as a boolean

    - #### getStatus

          public java.lang.String getStatus()

      Gets the status of this processing element
      Returns:
        the processing element status

    - #### getStatusReason

          public java.lang.String getStatusReason()

      Gets additional status for this processing element
      Returns:
        any addition status for this processing element

    - #### getTracingLevel

          public java.lang.String getTracingLevel()

      Gets the granularity of the tracing level for this processing element
      Returns:
        the current tracing level that contains one of the following values:
        - off
        - debug
        - error
        - trace

    - #### getResourceAllocation

          public ResourceAllocation getResourceAllocation()
                                                   throws java.io.IOException

      Gets the `resource allocation` for this processing element.
      Returns:
        `resource allocation`
      Throws:
        `java.io.IOException`
      Since:
        1.9