7.1 Advanced Deferred Event API

Advanced deferred callback management is provided through the use of deferred event concentrators and deferred event splitters. These implement the DeferredConcentrator and DeferredSplitter interfaces respectively. The reactor core acts as a factory for components implementing these interfaces and the standard reactor interface provides the factory functions shown in Listing 7.1.


\begin{listing}
% latex2html id marker 1915\begin{small}\begin{verbatim}pack...
...mall}\caption{Reactor Advanced Deferred Event API Factory Methods}
\end{listing}

The newDeferredConcentrator factory method will return an object which implements the DeferredConcentrator interface as shown in Listing 7.2. Similarly, the newDeferredSplitter factory method will return an object which implements the DeferredSplitter interface as shown in Listing 7.3.


\begin{listing}
% latex2html id marker 1929\begin{small}\begin{verbatim}pack...
...all}\caption{Interface Definition for Deferred Event Concentrator}
\end{listing}


\begin{listing}
% latex2html id marker 1937\begin{small}\begin{verbatim}pack...
...d{small}\caption{Interface Definition for Deferred Event Splitter}
\end{listing}

In the case of both the concentrator and splitter interfaces there is an addInputDeferred method for attaching deferred event inputs as well as a getOutputDeferred method for obtaining a handle on an output deferred event object. However, there are obvious functional differences between the implementation of these calls for concentrator and splitter components.