Class StringPNListener
- java.lang.Object
-
- ptolemy.domains.pn.kernel.event.test.StringPNListener
-
- All Implemented Interfaces:
PNProcessListener
public class StringPNListener extends java.lang.Object implements PNProcessListener
A PNProcessListener that listens for events generated by PNDirector and converts it to a string. An StringPNListener is able to receive PNProcessEvents that are issued during the execution of a process by a ProcessThread or director in PN.When getProfile() is called, the internal buffer is returned and the internal buffer is reset.
- Since:
- Ptolemy II 0.3
- Version:
- $Id$
- Author:
- Mudit Goel, Christopher Hylands
- Pt.AcceptedRating:
- Red
- Pt.ProposedRating:
- Yellow (mudit)
-
-
Constructor Summary
Constructors Constructor Description StringPNListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getProfile()
Return a string containing a description of all the activities recorded by the listener and reset the description.void
processFinished(PNProcessEvent event)
Called to report that the execution of a process finished.void
processStateChanged(PNProcessEvent event)
Called to report that a process has changed its state (i.e.
-
-
-
Method Detail
-
getProfile
public java.lang.String getProfile()
Return a string containing a description of all the activities recorded by the listener and reset the description.- Returns:
- the profile.
-
processFinished
public void processFinished(PNProcessEvent event)
Called to report that the execution of a process finished. The wrapup sequence may or may not have completed normally. The execution event will contain a reference to the actor corresponding to the process that finished and the reason for finishing.- Specified by:
processFinished
in interfacePNProcessListener
- Parameters:
event
- A PNProcessEvent that contains a reference to an actor.
-
processStateChanged
public void processStateChanged(PNProcessEvent event)
Called to report that a process has changed its state (i.e. started, or blocked or unblocked, etc.). The PNProcessEvent will contain a reference to the actor corresponding to the process. The event will also indicate the new state and blocking cause, etc.- Specified by:
processStateChanged
in interfacePNProcessListener
- Parameters:
event
- A PNProcessEvent that contains a reference to an actor.
-
-