Class JmcRuntimeEvent

java.lang.Object
org.mpi_sws.jmc.runtime.JmcRuntimeEvent

public class JmcRuntimeEvent extends Object
Represents an event that occurs during the execution of a program.
  • Constructor Details

    • JmcRuntimeEvent

      public JmcRuntimeEvent(JmcRuntimeEvent.Type type, Long taskId, Map<String,Object> params)
      Constructs a new runtime event with the specified type, task ID, and parameters.
      Parameters:
      type - the type of the event
      taskId - the ID of the task that generated the event
      params - the parameters of the event
    • JmcRuntimeEvent

      public JmcRuntimeEvent(JmcRuntimeEvent.Type type, Long taskId)
      Constructs a new runtime event with the specified type and task ID.

      The parameters of the event are initialized to an empty map.

      Parameters:
      type - the type of the event
      taskId - the ID of the task that generated the event
  • Method Details

    • getType

      public JmcRuntimeEvent.Type getType()
      Returns the type of the event.
      Returns:
      the type of the event
    • getTaskId

      public Long getTaskId()
      Returns the ID of the task that generated the event.
      Returns:
      the ID of the task that generated the event
    • getParams

      public Map<String,Object> getParams()
      Returns the parameters of the event.
      Returns:
      the parameters of the event
    • setType

      public void setType(JmcRuntimeEvent.Type type)
      Sets the type of the event.
      Parameters:
      type - the type of the event
    • setTaskId

      public void setTaskId(Long taskId)
      Sets the ID of the task that generated the event.
      Parameters:
      taskId - the ID of the task that generated the event
    • setParams

      public void setParams(Map<String,Object> params)
      Sets the parameters of the event.
      Parameters:
      params - the parameters of the event
    • setParam

      public void setParam(String key, Object value)
      Sets the value of the parameter with the specified key.
      Parameters:
      key - the key of the parameter
      value - the value of the parameter
    • getParam

      public <T> T getParam(String key)
      Returns the value of the parameter with the specified key as an object of the specified class.
      Parameters:
      key - the key of the parameter
      Returns:
      the value of the parameter as an object of the specified class. Can throw an exception when casting.
    • toString

      public String toString()
      Overrides:
      toString in class Object