Author: elecharny
Date: Fri Oct 31 06:29:49 2008
New Revision: 709405
URL: http://svn.apache.org/viewvc?rev=709405&view=rev
Log:
o Removed the 'final' keyword for the messageReceived and execptionCaught
methods
o Added a message in the javadoc to warn the user who might forget to call the
messageHandler when overloading those methods.
Modified:
mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
Modified:
mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java?rev=709405&r1=709404&r2=709405&view=diff
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/handler/demux/DemuxingIoHandler.java
Fri Oct 31 06:29:49 2008
@@ -219,9 +219,13 @@
/**
* Forwards the received events into the appropriate [EMAIL PROTECTED]
MessageHandler}
* which is registered by [EMAIL PROTECTED]
#addReceivedMessageHandler(Class, MessageHandler)}.
+ *
+ * <b>Warning !</b> If you are to overload this method, be aware that you
+ * _must_ call the messageHandler in your own method, otherwise it won't
+ * be called.
*/
@Override
- public final void messageReceived(IoSession session, Object message)
+ public void messageReceived(IoSession session, Object message)
throws Exception {
MessageHandler<Object> handler =
findReceivedMessageHandler(message.getClass());
if (handler != null) {
@@ -233,8 +237,15 @@
}
}
+ /**
+ * Invoked when a message written by IoSession.write(Object) is sent out.
+ *
+ * <b>Warning !</b> If you are to overload this method, be aware that you
+ * _must_ call the messageHandler in your own method, otherwise it won't
+ * be called.
+ */
@Override
- public final void messageSent(IoSession session, Object message) throws
Exception {
+ public void messageSent(IoSession session, Object message) throws
Exception {
MessageHandler<Object> handler =
findSentMessageHandler(message.getClass());
if (handler != null) {
handler.handleMessage(session, message);