Issue Details (XML | Word | Printable)

Key: DIRMINA-118
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Niklas Therning
Reporter: Trustin Lee
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
MINA

DemuxingIoHandler should look up super classes, too, and cache the lookup results.

Created: 07/Nov/05 03:44 PM   Updated: 30/Nov/05 01:03 PM
Return to search
Component/s: None
Affects Version/s: 0.8.0
Fix Version/s: 0.9.0

Time Tracking:
Not Specified

Resolution Date: 29/Nov/05 11:52 PM


 Description  « Hide
Jose Alberto Fernandez wrote:

Another matter around Demux, is that currently it only looks at super-interfaces if a direct match is not found,

But it does not look at super-classes. This is annoying when you have protocols that extend all messages from some particular superclass and you want to be able to treat groups of messages the same way (like ignoring them).

Also, it may be interesting to see if there is a good way to cache the resolution of super-interfaces and super-classes in order to make such code more efficient. You will just need to make sure that the cache is flushed when MessageHandlers are added or removed.

 

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #349722 Tue Nov 29 14:47:04 UTC 2005 niklas Resolved DIRMINA-118
Files Changed
ADD /directory/network/trunk/src/test/org/apache/mina/handler/DemuxingIoHandlerTest.java
MODIFY /directory/network/trunk/src/java/org/apache/mina/handler/DemuxingIoHandler.java
ADD /directory/network/trunk/src/test/org/apache/mina/handler

Niklas Therning made changes - 29/Nov/05 08:26 PM
Field Original Value New Value
Assignee Trustin Lee [ trustin ] Niklas Therning [ niklas@trillian.se ]
Niklas Therning made changes - 29/Nov/05 08:26 PM
Status Open [ 1 ] In Progress [ 3 ]
Niklas Therning added a comment - 29/Nov/05 11:52 PM
When searching for a MessageHandler for a given message object the superclass will now be searched recursively when no match can be found for the immediate message class or any of the interfaces implemented by the immediate message class. For efficiency reasons matches will be cached. The cache is cleared on calls to addMessageHandler and removeMessageHandler.

Niklas Therning made changes - 29/Nov/05 11:52 PM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Trustin Lee added a comment - 30/Nov/05 01:03 PM
Great fix, Niklas!

Trustin Lee made changes - 30/Nov/05 01:03 PM
Status Resolved [ 5 ] Closed [ 6 ]