Hi hikage,
i don't know why nobody answer your question. But i have question for you. :-)
In the sources in DefaultMessageListenerContainer i found this:
Code:
/**
* Method that notify a listener correctly according to its type
*
* @param listener the listener to notify
* @param packet the arrival packet
*/
protected void notifyListener(PacketListener listener, Packet packet) {
if (listener instanceof PacketListener) {
if (LOGGER.isTraceEnabled()) LOGGER.trace("Notify a PacketListener");
((PacketListener) listener).onPacket(packet, this.connection);
}
}
You put an "PacketListener" as an parameter "listener". Why do you check with "instanceof" the type?
It is an "PacketListener". And so the cast to "PacketListener" on "listener" is not needed too.
Did i miss something. Is there a good reason for doing this? It will be a "one-liner".
Maybe your extension is usefull for the spring community did you go the "right way"?
There are some processes defined for every new extension.
You can find further information here:
http://www.springsource.org/extensions/lifecycle
and here
http://www.springsource.org/extensions/proposing
Thanks in advance and good luck. :-)
Jörg