[xSocket-develop] HandlerChain Inheritance
Status: Inactive
Brought to you by:
grro
|
From: Javier P. <jav...@ls...> - 2009-08-13 09:49:29
|
Hi,
I´m using xSockets for one of my projects and I need that HandlerChain
acceptds HandlerChain in the addLast(IHandler h) Method.
I check your code I saw it is not implemented. I was going to
implemented myself in a class that inherit from HandlerChain and sent it
to you.
However the way the visibility is given to the classess in the library
make it impossible to do this with out having to create your own version
of the library which is quite incovinient.
Here goes the change in Method addLAst(IHandler h) from HanderChain put:
if (handler instanceof HandlerChain) {
for ( IHandler h : ((HandlerChain) handler).handlers){
addLast(h);
}
}
instead of
if (handler instanceof HandlerChain) {
throw new RuntimeException("a nested chains are not supported");
}
Now the question is, when could this change be included in a new release
of the XSockets API or in case it is not. It is forseen to introduce any
changes in the visibilities within the API to make it easier to extends
from the classes defined there.
Best Regards,
Javi
|