Hi Jeremy, Calling IoBuffer.asInputStream() or IoBuffer.asOutputStream() could address your issue. Could you give them a try?
HTH, Jeremy Haile wrote: > I'm using MINA as a server to process client connections. However, my > application also needs to make a client connection to a server and feed > the retrieved data to a 3rd party library. The client connection will > be maintained 24 hours a day, so it is important that it can reconnect > automatically in case of network failure. > > The 3rd party library requires an InputStream to process data. I > originally attempted to use the StreamIoHandler with a SocketConnector > but ran into problems and found archived messages recommending not to > use this handler. > > Given that the 3rd party library requires an InputStream, is MINA the > appropriate choice? There is only one client connection, so non-blocking > vs blocking I/O really isn't an issue. Should I simply use a socket? > If not, what does MINA really offer me over a plain socket connection in > this case? > > The only thing I can think of is exception handling event callbacks > which could assist with automatic reconnections. Of course, with the > socket I can just wrap my InputStream processing and catch all > IOExceptions - then attempt to reconnect after a short delay. > > Any advice? > > Thanks, > Jeremy Haile -- Trustin Lee - Principal Software Engineer, JBoss, Red Hat -- what we call human nature is actually human habit -- http://gleamynode.net/
signature.asc
Description: OpenPGP digital signature
