Record Class StageContext

java.lang.Object
java.lang.Record
com.inductiveautomation.eventstream.gateway.stages.StageContext

public record StageContext(ResourceId resourceId, String name, Executor executor, GatewayEventStreamExpressionFactory expressionFactory, com.codahale.metrics.MetricRegistry metrics, LoggerEx logger, boolean testMode) extends Record
  • Constructor Details

    • StageContext

      public StageContext(ResourceId resourceId, String name, Executor executor, GatewayEventStreamExpressionFactory expressionFactory, com.codahale.metrics.MetricRegistry metrics, LoggerEx logger, boolean testMode)
      Creates an instance of a StageContext record class.
      Parameters:
      resourceId - the value for the resourceId record component
      name - the value for the name record component
      executor - the value for the executor record component
      expressionFactory - the value for the expressionFactory record component
      metrics - the value for the metrics record component
      logger - the value for the logger record component
      testMode - the value for the testMode record component
  • Method Details

    • key

      public EventStreamKey key()
    • nest

      public StageContext nest(String name)
    • eventStreamContext

      public EventStreamContext eventStreamContext()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • resourceId

      public ResourceId resourceId()
      Returns the value of the resourceId record component.
      Returns:
      the value of the resourceId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • executor

      public Executor executor()
      Returns the value of the executor record component.
      Returns:
      the value of the executor record component
    • expressionFactory

      public GatewayEventStreamExpressionFactory expressionFactory()
      Returns the value of the expressionFactory record component.
      Returns:
      the value of the expressionFactory record component
    • metrics

      public com.codahale.metrics.MetricRegistry metrics()
      Returns the value of the metrics record component.
      Returns:
      the value of the metrics record component
    • logger

      public LoggerEx logger()
      Returns the value of the logger record component.
      Returns:
      the value of the logger record component
    • testMode

      public boolean testMode()
      Returns the value of the testMode record component.
      Returns:
      the value of the testMode record component