Thanks Emmanuel.
It does look like it is not possible to do. Frankly a surprise for me.
Mina seems so close :).
Is there any interest in enabling such a functionality? Need not be
exactly what I proposed.. but some thing similar.
Some very useful things are public and some equally useful things are
visible only with in the package. I am not sure about the rationale
behind it or how long the currently public classes stay public.
There are a few more features for MINA we are interested in. I filed a
Jira to discuss using Mina as the NIO framework in Hadoop :
https://issues.apache.org/jira/browse/HADOOP-3856
Current state :
---------------
I am planning to use MINA core for some of the IO using following two
classes :
/** 1)
* This is a modified version of
* org.apache.mina.transport.socket.nio.NioSocketSession.
*/
public class MinaNioSocketSession extends AbstractIoSession {
/*...*/ }
/** 2)
* This is a modified version of
* org.apache.mina.transport.socket.nio.NioProcessor
*/
public class MinaNioProcessor extends
AbstractPollingIoProcessor<MinaNioSocketSession> {
/*...*/ }
Any access changes to NioSocketSession and NioProcessor that makes the
above classes simpler would be great.
This thread probably belongs in dev list. I didn't realize I might end
up getting deeper into the code when I first started looking at MINA.
thanks,
Raghu.
Emmanuel Lecharny wrote:
Hi Raghu,
I may be wrong, but I don't think this is possible with MINA., natively.
You may have to define a new NioSocketConnector where you can pass an
already connected socket as a parameter (just an idea, not sure this is
easy to do).
Hope it helps (at least a bit ;)
Raghu Angadi wrote:
I thought I will ask again, just to be sure :
My current use case looks like this :
[write socket]---<----( Thread )---<----[read socket]
Traffic from read socket to write socket is pretty low. These are
non-blocking NIO sockets created else where (not by MINA). I would
like to replace these threads using MINA.
Can someone confirm if it is possible or not possible to use existing
sockets with MINA?