Package ptolemy.component
Interface Component
- 
- All Known Implementing Classes:
- AtomicComponent,- ComponentActor,- ComponentDirector,- Counter,- Leds,- PtinyOSDirector
 
 public interface ComponentThis interface defines the basic methods for initializing and executing components. The intended usage is that preinitialize() is invoked exactly once in an execution of a model, before any static analysis such as scheduling or type resolution is done. The initialize() method may be invoked more than once to initialize() a component, and it is invoked after static analysis. The run() method may be invoked multiple times after initialize(). The wrapup() method is invoked exactly once at the end of an execution of a model. It is important that an implementor ensure that wrapup() is called even if an exception occurs.- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Yang Zhao and Edward A. Lee
- Pt.AcceptedRating:
- red (davisj)
- Pt.ProposedRating:
- yellow (ellen_zh)
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidinitialize()Initialize the component.voidpreinitialize()Preinitialize the component.voidrun()Execute the component.voidwrapup()Wrap up an execution.
 
- 
- 
- 
Method Detail- 
initializevoid initialize() throws IllegalActionExceptionInitialize the component. This is invoked once after preinitialize() and again whenever the component needs to be reinitialized.- Throws:
- IllegalActionException- If initialization cannot be completed.
 
 - 
preinitializevoid preinitialize() throws IllegalActionExceptionPreinitialize the component. This is invoked exactly once per execution of a model, before any other methods in this interface are invoked.- Throws:
- IllegalActionException- If preinitialization cannot be completed.
 
 - 
runvoid run() throws IllegalActionException Execute the component. This is invoked after preinitialize() and initialize(), and may be invoked repeatedly.- Throws:
- IllegalActionException- If the run cannot be completed.
 
 - 
wrapupvoid wrapup() throws IllegalActionExceptionWrap up an execution. This method is invoked exactly once per execution of a model. It finalizes an execution, typically closing files, displaying final results, etc. If any other method from this interface is invoked after this, it must begin with preinitialize().- Throws:
- IllegalActionException- If wrapup fails.
 
 
- 
 
-