Issue Details (XML | Word | Printable)

Key: DIRMINA-96
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Trustin Lee
Reporter: Trustin Lee
Votes: 0
Watchers: 0
Operations

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

Provide an API for connectionless transport types to create a session from IoAcceptor.

Created: 17/Oct/05 10:43 AM   Updated: 19/Oct/05 04:42 PM
Return to search
Component/s: None
Affects Version/s: 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4
Fix Version/s: 0.8.0

Time Tracking:
Not Specified

Resolution Date: 19/Oct/05 04:42 PM


 Description  « Hide
Connectionless transport types such as UDP has a problem with the current API because there's no way for IoHandler bound to an acceptor to send a message before a client sends data. This issue has been discussed in this thread:

http://www.nabble.com/-mina-DatagramAcceptor-RFE-t410448.html

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee added a comment - 18/Oct/05 12:41 AM
Here's my idea:

* Add ConnectionlessIoAcceptor which extends IoAcceptor
* Add ConnectionlessIoAcceptor.newSession(SocketAddress remoteAddress, SocketAddress localAddress)

Users will be able to create a session object by calling newSession so easily that they can call write() method.

WDYT?

Alban Peignier added a comment - 18/Oct/05 01:49 AM
I like it :o) But in my mind, localAddress is optional (useless ?) because the IoAcceptor is already bound and you want to use this bound local address.

Trustin Lee added a comment - 18/Oct/05 01:53 AM
You have to specify local address because you can bind multiple handlers to multiple local addresses.

Alban Peignier added a comment - 18/Oct/05 02:03 AM
You're perfectly right. So +1 for me.

Trustin Lee added a comment - 19/Oct/05 03:04 PM
Decided to resolve this issue in 0.8.

Trustin Lee added a comment - 19/Oct/05 04:42 PM
Added IoAcceptor.newSession(remoteAddress, localAddress) which returns IoSession.
Transport types other than connectionless ones throw UnsupportedOperation.

I didn't extend IoAcceptor because it is much simpler this way.