Ashish wrote:
Have started looking into the FilterChain implementation and here are
some initial thoughts
1. Rename IoFilterChain as IoChannel - it gives a more clear picture
and is easy to understand like imagine as a Channel with multiple
stages aka IoFilters.
This came while I was drawing on paper to design something.
Well, I would rather keep the current name. The 'filter' terminology is
quite commonly accepted for such a pattern. Servlet uses it
(http://java.sun.com/blueprints/patterns/InterceptingFilter.html), and
it also refers to the CoR pattern
(http://en.wikipedia.org/wiki/Chain-of-responsibility_pattern).
2. Have captured a couple of API's that are core to IoChannel
IoSession getSession();
IoFilter getHead();
IoFilter getNextFilter(IoFilter currentFilter);
List<IoFilter> getAll();
void addFilter(String name, IoFilter filter);
void addAfter(String baseName, String filterName,
IoFilter filter);
void removeFilter(String filterName);
There are a lot more API's in current implementation. I am not sure if
we need replace API or not.
There is something that need to be done in any case : check the current
API, keep what is necessary, remove what is useless.
Also do we need the Generics version of these API's or its fine without them?
The problem is that we are transferring Objects from one filter to the
other, and it's a bit too generic. As already stated, it would be much
better if we can pass a stream of "something", this something could
perfectly be generic.
Now, a question has been raised about the use of Stream : what about the
semantic of this element, assuming that we will need a non-blocking stream ?
This is just the initial list. Will checkin the files once the name
Ok, thanks !
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org