Package org.mpi_sws.jmc.runtime
Class JmcRuntimeEvent
java.lang.Object
org.mpi_sws.jmc.runtime.JmcRuntimeEvent
Represents an event that occurs during the execution of a program.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for constructing aJmcRuntimeEventobject.static enumEnum representing the different types of runtime events that can occur. -
Constructor Summary
ConstructorsConstructorDescriptionJmcRuntimeEvent(JmcRuntimeEvent.Type type, Long taskId) Constructs a new runtime event with the specified type and task ID.JmcRuntimeEvent(JmcRuntimeEvent.Type type, Long taskId, Map<String, Object> params) Constructs a new runtime event with the specified type, task ID, and parameters. -
Method Summary
Modifier and TypeMethodDescription<T> TReturns the value of the parameter with the specified key as an object of the specified class.Returns the parameters of the event.Returns the ID of the task that generated the event.getType()Returns the type of the event.voidSets the value of the parameter with the specified key.voidSets the parameters of the event.voidSets the ID of the task that generated the event.voidsetType(JmcRuntimeEvent.Type type) Sets the type of the event.toString()
-
Constructor Details
-
JmcRuntimeEvent
Constructs a new runtime event with the specified type, task ID, and parameters.- Parameters:
type- the type of the eventtaskId- the ID of the task that generated the eventparams- the parameters of the event
-
JmcRuntimeEvent
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 eventtaskId- the ID of the task that generated the event
-
-
Method Details
-
getType
Returns the type of the event.- Returns:
- the type of the event
-
getTaskId
Returns the ID of the task that generated the event.- Returns:
- the ID of the task that generated the event
-
getParams
Returns the parameters of the event.- Returns:
- the parameters of the event
-
setType
Sets the type of the event.- Parameters:
type- the type of the event
-
setTaskId
Sets the ID of the task that generated the event.- Parameters:
taskId- the ID of the task that generated the event
-
setParams
Sets the parameters of the event.- Parameters:
params- the parameters of the event
-
setParam
Sets the value of the parameter with the specified key.- Parameters:
key- the key of the parametervalue- the value of the parameter
-
getParam
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
-