4.1 The Signal Event API

Signal events are manipulated within the Reaction framework using signal event objects. The reactor core acts as a factory for these objects and the standard reactor interface (Reactor) provides the API shown in Listing 4.1.


\begin{listing}
% latex2html id marker 767\begin{verbatim}package com.zynapt...
...l();
...
}\end{verbatim}
\caption{Reactor Signal Factory Methods}
\end{listing}

The signal factory methods will return an object which implements the Signal interface as shown in Listing 4.2. Such objects are referred to here as being signal event objects since they encapsulate all the state associated with a single signal. The Signal interface provides methods for subscribing and unsubscribing signalable objects (ie, those implementing Signalable) and for generating new signal events.


\begin{listing}
% latex2html id marker 778\begin{verbatim}package com.zynapt...
...ption;
}\end{verbatim}
\caption{Signal Event Interface Definition}
\end{listing}


\begin{listing}
% latex2html id marker 784\begin{verbatim}package com.zynapt...
...ta);
}\end{verbatim}
\caption{The Signalable Interface Definition}
\end{listing}