commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Sprenger <sprenger...@gmail.com>
Subject Re: [CHAIN] Thoughts about o.a.c.chain2.Chain, o.a.c.chain2.Command and the base classes
Date Thu, 27 Jun 2013 08:02:05 GMT
Hi Elijah,

The ‘Continue’ and ‘Completed’ values look very similar to me, especially
in Unit tests. I suggest naming the two states:
- Continue
- Finished
>With regards to an enum for status, wouldn't it be better to use a class so
>that consumers could subclass it and add their own states if needed?

As far as I know, there is not a decision about the third state 'Aborted'
yet. So the question is, do the 3 states cover the complete set of possible
values? Implementing the exception handling might show the need for more
states.

I would suggest sticking with the enum for now. The refactoring from an
enum to a interface ‘Processing’ is not that big deal.

regards,
Jonas

2013/6/26 Elijah Zupancic <elijah@zupancic.name>

> +1 to everything.
>
> With regards to an enum for status, wouldn't it be better to use a class so
> that consumers could subclass it and add their own states if needed?
>
> Thanks,
> -Elijah
>
>
> On Sat, Jun 22, 2013 at 4:30 AM, Benedikt Ritter <beneritter@gmail.com
> >wrote:
>
> >
> > Am 22.06.2013 um 12:57 schrieb Simone Tripodi <simonetripodi@apache.org
> >:
> >
> > > Hi Jonas,
> > >
> > >>
> > >> I will provide a patch for
> > >> CHAIN-98<https://issues.apache.org/jira/browse/CHAIN-98>tomorow.
The
> > >> patch will only cover the refactoring of CONTINUE and
> > >> COMPLETED processing results.
> > >>
> > >
> > > nice to read that, looking forward to the patch! :)
> > >
> > >> But, I do not understand how exceptions should be handled in this
> > context.
> > >> A exception listener filters the exceptions and returns ABORTED if
> > >> appropriate?
> > >
> > > let's postpone it and keep CONTINUE and COMPLETED only ATM - Benedikt
> > > is working on an exception listener, let's see how it evolves and
> > > let's evaluate later if/how ABORTED will be introduced.
> >
> > Yeah, well I'm not really working on it. But I'll do as soon as I got the
> > time :)
> >
> > Benedikt
> >
> > >
> > > Thanks in advance, all the best!
> > > -Simo
> > >
> > > http://people.apache.org/~simonetripodi/
> > > http://twitter.com/simonetripodi
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > > For additional commands, e-mail: dev-help@commons.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> -Elijah
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message