The Input/Output/Manipulator interfaces need to be really simple, that
encourage
processing one Transaction at a time, and handling one Response at a
time.  There
is also the question of whether we want another component called the
Notifier.
The Notifier's responsibilities would be to handle the Responses and
send notifications
if there are errors.  Anyway, here is the first cut at interfaces:

interface Input
{
    void setDestination( Output out );
}

interface Output
{
    Response processTransaction( Transaction trans );
}

interface Manipulator extends Input, Output {}


I am planning for each Job to have it's own dedicated Container, and its
own
dedicated Thread.  For that reason each Input, Output, and Manipulator
will
be completely isolated from the corresponding components in other Jobs.
That
will help with the Manipulators having two methods that need to be
called in
a particular order as opposed to just one.  The Job pipeline will have
to be
built backwards because when a pure Input has its destination set, it
will start
sending Transactions down the Pipeline:

manip2.setDestination( out );
manip1.setDestination( manip2 );
in.setDestination( manip 1 );

If we have a Notifier component it would look like this:

interface Notifier
{
    void handleResponse( Response resp );
}

Internally it would determine if the response is worthy of notifying
someone
else, and if so would perform the steps required such as paging someone,
sending
an email, etc.

Separating out the Notifier would allow us to dynamically set up how we
respond
to bad transactions, etc.

Thoughts? Input?

"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to