Package ptolemy.domains.tm.kernel.test
Class TestScheduleListener
- java.lang.Object
-
- ptolemy.domains.tm.kernel.test.TestScheduleListener
-
- All Implemented Interfaces:
ScheduleListener
public class TestScheduleListener extends java.lang.Object implements ScheduleListener
This dummy schedule listener implements the ScheduleListener interface. Each time event() is called, a line is appended to an internal buffer. When getMessage() is called, the internal buffer is returned and the internal buffer is reset.- Since:
- Ptolemy II 2.1
- Version:
- $Id$
- Author:
- Christopher Hylands, based on TestScheduleListener by Yuhong Xiong
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
-
Fields inherited from interface ptolemy.domains.tm.kernel.ScheduleListener
RESET_DISPLAY, TASK_BLOCKED, TASK_RUNNING, TASK_SLEEPING
-
-
Constructor Summary
Constructors Constructor Description TestScheduleListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
event(java.lang.String actorName, double time, int scheduleEvent)
React to the given scheduling event.java.lang.String
getEvents()
Return strings describing the events seen by this listener.
-
-
-
Method Detail
-
getEvents
public java.lang.String getEvents()
Return strings describing the events seen by this listener. If no events have been seen, then the empty string is returned.- Returns:
- A String including the type change information.
-
event
public void event(java.lang.String actorName, double time, int scheduleEvent)
React to the given scheduling event.- Specified by:
event
in interfaceScheduleListener
- Parameters:
actorName
- The name of the actor involved in the event.time
- The time of the event.scheduleEvent
- One ofScheduleListener.RESET_DISPLAY
,ScheduleListener.TASK_SLEEPING
,ScheduleListener.TASK_BLOCKED
orScheduleListener.TASK_RUNNING
.
-
-