ptolemy.actor
Interface Initializable

All Known Subinterfaces:
Actor, BranchActor, CTDynamicActor, CTEventGenerator, CTStatefulActor, CTStepSizeControlActor, CTWaveformGenerator, DDI, Executable, GTCompositeActor, PeriodicDirector, RefinementActor, RefinementActor, Suspendable, TMActor, TypedActor, WirelessChannel
All Known Implementing Classes:
Absent, AbsoluteValue, AbstractCalInterpreter, AbstractDDI, AbstractPlaceableActor, Accumulator, Accumulator, ActorRecursion, AdaptiveMedian, AddSubtract, AddSubtract, AnythingToDouble, ApplyFilterOverArray, ApplyFunction, ApplyFunctionOverSequence, ArrayAppend, ArrayAverage, ArrayContains, ArrayElement, ArrayElementAsMatrix, ArrayExtract, ArrayLength, ArrayLevelCrossing, ArrayMaximum, ArrayMinimum, ArrayOfRecordsExporter, ArrayOfRecordsRecorder, ArrayPeakSearch, ArrayPeakSearch, ArrayPlotter, ArrayPlotterXY, ArrayRemoveElement, ArraySort, ArraySum, ArrayToElements, ArrayToSequence, ArrowKeyProbe, ArrowKeySensor, AtomicActor, AtomicActorMatcher, AtomicWirelessChannel, AudioCapture, AudioPlayer, AudioPlayer, AudioReadBuffer, AudioReader, AudioWriteBuffer, AudioWriter, Autocorrelation, Autocorrelation, Average, Average, AverageOverTime, BackDropQueue, Backtrack, BandlimitedNoise, BarGraph, Barrier, Barrier, Bernoulli, BinarySwitch, BitsToInt, BooleanMultiplexor, BooleanSelect, BooleanSelect, BooleanSwitch, BooleanSwitch, BooleanToAnything, BoundedBufferNondeterministicDelay, BoundedBufferTimedDelay, Box2D, Box3D, Buffer, Buffer, BusAssembler, BusDisassembler, ButtonTime, CalInterpreter, CartesianToComplex, CartesianToPolar, Case, Case, Case, CaseDirector, Chop, Chop, CIActor, CIDirector, CipherActor, CircularSweep3D, ClassWrapper, ClipPlayer, Clock, ClockSensor, Clone, CodegenActor, CollisionDetector, ColorFinder, ColtBeta, ColtBinomial, ColtBinomialSelector, ColtBreitWigner, ColtChiSquare, ColtExponential, ColtExponentialPower, ColtGamma, ColtHyperGeometric, ColtLogarithmic, ColtNegativeBinomial, ColtNormal, ColtPoisson, ColtPoissonSlow, ColtRandomSource, ColtStudentT, ColtVonMises, ColtZeta, Commutator, Commutator, Comparator, CompiledCompositeActor, CompiledCompositeActor, ComplexAddSubtract, ComplexToCartesian, ComplexToPolar, CompositeActor, CompositeActorMatcher, CompositeProcessDirector, ComputeHistogram, ComputeHistogram, Concat, Cone3D, ConfigurationSelect, ConfigurationSwitch, Configure, Configurer, Configurer, Const, ContinuousClock, ContinuousDirector, ContinuousIntegrator, ContinuousMerge, ContinuousTimeDelay, ContinuousTransferFunction, ContinuousTransferFunction, Converter, ConvolutionalCoder, Counter, Counter, CountTrues, Course, CryptographyActor, CSP, CSPActor, CSPBuffer, CSPDirector, CSPMultiSink, CSPMultiSource, CSPSieve, CSPSink, CSPSource, CTBaseIntegrator, CTCase, CTCaseDirector, CTCompositeActor, CTCompositeActor, CTDirector, CTEmbeddedDirector, CTMixedSignalDirector, CTMultiSolverDirector, CTPeriodicSampler, CTRateLimiter, CTRefinement, CTTriggeredSampler, Current, CurrentTime, Cylinder3D, DatabaseInsert, DatabaseManager, DatabaseQuery, DatabaseSelect, Dataflow, DataflowWithRates, DatagramReader, DatagramWriter, DB, DB, DCT2x2dc, DCT4x4dc, DCT8x8, DDEActor, DDEDirector, DDESink, DDF, DDFBooleanSelect, DDFDirector, DDFOrderedMerge, DDFSelect, DDFSingleTokenCommutator, DEActor, DebuggerParameter, DEDirector, Default, DelayChannel, DelayLine, DelayLine, DelayStart, Derivative, DeScrambler, DEThreadActor, DETransformer, Differential, Differential, DifferentialSystem, DifferentialSystem, Director, DirectoryListing, Discard, DiscreteClock, DiscreteClock, DiscreteClock, DiscreteRandomSource, Display, DistributedDirector, DistributedLineWriter, DistributedSDFDirector, DistributedTypedCompositeActor, Distributor, Distributor, DoNothingDirector, DotProduct, DoubleFork, DoubleMatrixToJAI, DoubleReader, DoubleReader, DoubleToFix, DoubleToMatrix, DownSample, DTDirector, ElementsToArray, Ellipse2D, EmbeddedCActor, EmbeddedCActor.EmbeddedActor, EmbeddedCFileActor, EmbeddedCFileActor.EmbeddedFileActor, EmbeddedJavaActor, EmbeddedJavaActor.EmbeddedActor, EnabledComposite, Equals, ErasureChannel, Event, EventButton, EventFilter, EventQueueDebugger, EventSource, EventSource, Exec, Execute, ExecutionTime, Exit, Expression, Expression, ExpressionReader, ExpressionToToken, ExpressionWriter, FeedBackDelay, FFT, FFT, FileReader, FileWriter, FIR, FirstOrderHold, FixComparator, FixConst, FixCounter, FixedPointDirector, FixSequence, FixToDouble, FixToFix, FixToString, FixTransformer, FmvAutomaton, FmvAutomaton, FrontDropQueue, FSMActor, FSMActor, FSMDirector, FSMDirector, FSMMatcher, Gaussian, Gaussian, GetCausalityInterface, GetCurrentMicrostep, GetProperties, GiottoDirector, GRActor, GRActor2D, GRActor3D, GradientAdaptiveLattice, GradientAdaptiveLattice, GraphicalLocator, GRDirector, GRShadedShape, GRShape2D, GRTransform, GRTransform2D, GTEvent, HadamardCode, HammingCoder, HammingDecoder, HDFDirector, HDFFSMDirector, HistogramPlotter, HSFSMDirector, HSModalDirector, HTVQEncode, HuffmanBasic, HuffmanCoder, HuffmanDecoder, HybridModalDirector, IDCT4x4dc, IDCT8x8, IFFT, IFFT, IIR, IIR, Image2D, ImageContrast, ImageDisplay, ImageDisplay, ImagePartition, ImageReader, ImageRotate, ImageSequence, ImageToJAI, ImageToJMF, ImageToString, ImageUnpartition, Inhibit, InitModel, InitModelWithContainer, InputModel, InstantaneousDialogGenerator, IntArrayToString, IntegerCounter, Integrator, Integrator, Integrator, InteractiveShell, InterfaceAutomaton, InterfaceAutomaton, Interpolator, Interpolator, IntToBits, InUnitsOf, IsPresent, IterateOverArray, IterateOverArray.IterateComposite, IterateOverArray.IterateDirector, JAIAffineTransform, JAIBandCombine, JAIBandSelect, JAIBMPWriter, JAIBorder, JAIBoxFilter, JAIConstant, JAIConvolve, JAICrop, JAIDataConvert, JAIDCT, JAIDFT, JAIEdgeDetection, JAIIDCT, JAIIDFT, JAIImageReader, JAIInvert, JAIJPEGWriter, JAILog, JAIMagnitude, JAIMedianFilter, JAIPeriodicShift, JAIPhase, JAIPNGWriter, JAIPNMWriter, JAIPolarToComplex, JAIRotate, JAIScale, JAITIFFWriter, JAIToDoubleMatrix, JAITranslate, JAITranspose, JAIWriter, JopReadPort, JopSerialRead, JopSerialWrite, JopWatchDog, JopWritePort, KeyInput3D, KeyInput3DProbe, KeyReader, KeyStoreActor, KeyWriter, Lattice, LazyTypedCompositeActor, LEDMatrix, LempelZivCoder, LempelZivDecoder, LevelCrossingDetector, LevelCrossingDetector, LevinsonDurbin, LifeCycleManager, LimitedFiringSource, LimitedRangeChannel, Limiter, Line2D, LinearDifferenceEquationSystem, LinearDifferenceEquationSystem, LinearStateSpace, LinearStateSpace, LineCoder, LineReader, LineWriter, LinkVisualizer, ListDirectory, LiveSoundActor, LMSAdaptive, Locator, LogicalNot, LogicalNot, LogicFunction, LogicFunction, LongToDouble, LookupTable, MapFileStorage, MapWorker, Match, MathFunction, MatrixJoin, MatrixSplit, MatrixToDouble, MatrixToSequence, MatrixViewer, Maximum, MaxIndex, Memory, Merge, Merge, MicaCompositeActor, MicaLeds, Minimum, MirrorComposite, MirrorComposite.MirrorCompositeContents, MobileFunction, MobileModel, ModalController, ModalController, ModalDirector, ModalDirector, ModalModel, ModalModel, ModalModelMatcher, ModalRefinement, ModelCombine, ModelDisplay, ModelExecutor, ModelExecutor.Wrapper, ModelExecutor.Wrapper.WrapperDirector, ModelGenerator, ModelParameter, ModelReference, ModelView, MoMLGenerator, MonitorImage, MonitorValue, MouseInput3D, MovableViewScreen3D, MovieReader, MovieWriter, MovingAverage, MovingMaximum, MultiCompositeActor, MultiInstanceComposite, Multiplexor, Multiplexor, Multiplexor, Multiplier, MultiplyDivide, MultirateFSMDirector, MultirateFSMDirector, NCComponentBase, NCCompositeActor, NodeRandomizer, Noise, Noise, NondeterministicMerge, NondeterministicMerge.ChannelActor, NondeterministicMerge.MergeDirector, NonInterruptibleTimer, NonStrictDelay, NonStrictDisplay, NonStrictFSMDirector, NonStrictFSMDirector, NonStrictLogicFunction, NonStrictTest, NonStrictThreeBitAdder, Occupants, Or, OrderedMerge, OrderedMerge, OrderedRecordAssembler, OutputModel, ParameterSet, Pattern, PeriodicSampler, PetriNetActor, PetriNetDirector, PhaseUnwrap, PhaseUnwrap, PID, Place, PlaySound, Plot, Plotter, PlotterBase, PNDirector, PoissonClock, PoissonClock, PolarToCartesian, PolarToComplex, PolyCylinder3D, PowerLossChannel, Pre, Previous, PrivateKeyReader, ProcessDirector, PSDFDirector, PSNR, PtalonActor, PtalonMatcher, PtalonMatcher.NestedPtalonActor, PteraController, PteraDirector, PteraModalModel, PtinyOSCompositeActor, PtinyOSDirector, PtinyOSNodeParameter, PublicKeyReader, Publisher, PublisherNonStrictTest, PublisherTest, Pulse, Pulse, PythonScript, Quantizer, Queue, Queue, RaisedCosine, Ramp, Ramp, RandomSource, RandomSource, Reader, ReadModel, RealTimeComposite, RealTimeComposite.RealTimeDirector, RealTimePlotter, ReceiveInput, RecordAssembler, RecordDisassembler, Recorder, Recorder, RecordUpdater, Rectangle2D, RectangularFigure2D, RecursiveLattice, RecursiveLattice, ReduceWorker, Refinement, Refinement, Refinement, Region, Register, Register, RegisterSR, Remainder, RemoveNilTokens, RendezvousDirector, Repeat, Replacement, Report, ResettableTimer, ResourcePool, ResourcePool, Rician, ROM, Room, Rotate2D, Rotate3D, Round, RunCompositeActor, SaltAndPepper, SampleDelay, Sampler, Sampler, Scale, Scale2D, Scale3D, Scrambler, SDF, SDFConverter, SDFDirector, SDFTransformer, SecretKey, SecretKeyReader, Select, Select, Sequence, Sequence, SequencePlotter, Sequencer, Sequencer, SequenceScope, SequenceSource, SequenceToArray, SequenceToMatrix, SequentialClock, SequentialClock, SerialComm, Server, SetProperties, SetTableau, SetVariable, SharedParameter, SharedQueue, SignatureActor, SignatureSigner, SignatureVerifier, Simulator, SingleEvent, SingleTokenCommutator, SingleTokenDistributor, Sink, SketchedSource, Sleep, Sleep, Slice, Slicer, SliderSource, SMVLegacyCodeActor, SoundActor, SoundPlayer, Source, Sphere3D, SplitReader, SQLStatement, SRDirector, Starver, StateMatcher, StaticSchedulingDirector, Stop, Stop, StreamLoader, StringCompare, StringConst, StringFunction, StringIndexOf, StringLength, StringMatches, StringReplace, StringSimpleReplace, StringSubstring, StringToIntArray, StringToKeyValue, StringToUnsignedByteArray, StringToXML, SubMatrix, Subscriber, SubscriptionAggregator, SumofAbsoluteDifferences, SuppressSimultaneousEvents, SurgeVisualizer, Switch, Switch, SymmetricDecryption, SymmetricEncryption, Synchronizer, SynchronousFixTransformer, SystemCommand, TableauParameter, TDLActor, TDLController, TDLModule, TDLModuleDirector, TDLRefinement, TDLTask, TerrainProperty, Test, Test, TestActorPortDepth, TesterDirector, TestExceptionHandler, TextString3D, ThreadedComposite, ThreadedComposite.ThreadedDirector, ThresholdMonitor, ThrowException, ThrowModelError, TimeCompare, TimedDelay, TimeDelay, TimedPlotter, TimedPNDirector, TimedScope, TimedSource, TimeGap, Timer, TMCompositeFacade, TMDirector, TokenToExpression, TopLevelCurrentTime, Torus3D, Transform, Transform.EmbeddedConfigurer, TransformationRule, TransformationRule.TransformationDirector, Transformer, TransitionRefinement, TransitionRefinement, Translate2D, Translate3D, TransmitPropertyTransformer, TrellisDecoder, Triangular, Triangulator, TrigFunction, TriggeredClock, TriggeredContinuousClock, TrueGate, TypedAtomicActor, TypedCompositeActor, TypeOpaqueCompositeActor, TypeTest, UnaryMathFunction, Undefined, Uniform, UnionDisassembler, UnionMerge, UnsignedByteArrayToString, UpSample, URLDirectoryReader, URLReader, URLToImage, VariableClock, VariableDelay, VariableFIR, VariableLattice, VariableRecursiveLattice, VariableSleep, VectorAssembler, VectorDisassembler, VideoCamera, VideoPlayer, View, ViewScreen2D, ViewScreen3D, VisualModelReference, ViterbiDecoder, VQDecode, WaitingTime, WallClockTime, When, Wire, Wire, WiredToWireless, WirelessComposite, WirelessDirector, WirelessToWired, WriteModel, Writer, XMLInclusion, XSLTransformer, XYPlotter, XYScope, ZeroCrossingDetector, ZeroOrderHold, ZeroOrderHold

public interface Initializable

This interface defines a subset of the action methods for initialization and wrapup. It should be implemented by objects that do not need to invoked during runtime, but should be invoked in preinitialize() (exactly once, prior to type resolution), in initialize() (which could happen repeatedly during execution), or wrapup() (exacty once, at the end of execution).

Since:
Ptolemy II 6.1
Version:
$Id: Initializable.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Edward A. Lee
Accepted Rating:
Red (cxh)
Proposed Rating:
Green (eal)

Method Summary
 void addInitializable(Initializable initializable)
          Add the specified object to the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.
 void initialize()
          Begin execution of the actor.
 void preinitialize()
          This method should be invoked exactly once per execution of a model, before any of these other methods are invoked.
 void removeInitializable(Initializable initializable)
          Remove the specified object from the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.
 void wrapup()
          This method is invoked exactly once per execution of an application.
 

Method Detail

addInitializable

void addInitializable(Initializable initializable)
Add the specified object to the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object.

Parameters:
initializable - The object whose methods should be invoked.
See Also:
removeInitializable(Initializable)

initialize

void initialize()
                throws IllegalActionException
Begin execution of the actor. This is invoked exactly once after the preinitialization phase. Since type resolution is done in the preinitialization phase, along with topology changes that may be requested by higher-order function actors, an actor can produce output data and schedule events in the initialize() method.

Throws:
IllegalActionException - If execution is not permitted.

preinitialize

void preinitialize()
                   throws IllegalActionException
This method should be invoked exactly once per execution of a model, before any of these other methods are invoked. For actors, this is invoked prior to type resolution and may trigger changes in the topology, changes in the type constraints.

Throws:
IllegalActionException - If initializing is not permitted.

removeInitializable

void removeInitializable(Initializable initializable)
Remove the specified object from the list of objects whose preinitialize(), initialize(), and wrapup() methods should be invoked upon invocation of the corresponding methods of this object. If the specified object is not on the list, do nothing.

Parameters:
initializable - The object whose methods should no longer be invoked.
See Also:
addInitializable(Initializable)

wrapup

void wrapup()
            throws IllegalActionException
This method is invoked exactly once per execution of an application. None of the other action methods should be be invoked after it. It finalizes an execution, typically closing files, displaying final results, etc. When this method is called, no further execution should occur.

Throws:
IllegalActionException - If wrapup is not permitted.