On Thu, 2010-04-29 at 17:51 +0800, ching wrote: > I'm implementing a download application that works like android's > DownloadProvider but based HttpCore NIO. > > A fatal problem I encountered is this: > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): > java.nio.channels.IllegalSelectorException > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > java.nio.channels.spi.AbstractSelectableChannel.register(AbstractSelectableChannel.java:158) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > java.nio.channels.SelectableChannel.register(SelectableChannel.java:158) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processSessionRequests(DefaultConnectingIOReactor.java:244) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:97) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:317) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > io.DownloadClient.run(DownloadClient.java:168) > 04-29 09:26:05.419: ERROR/AndroidRuntime(332): at > java.lang.Thread.run(Thread.java:1096) > > however it can work on real j2se6, is that unsupported on android at all? >
HttpCore NIO has not been tested for compatibility with Android, so problems like this can happen. If you are willing to work with SVN snapshots, I will happily put together patches you could try out. As James pointed out, raising a JIRA would be the right way to go about the problem. > And a minor problem: Will "ioReactor.execute(ioEventDispatch)" really throw > out a InterruptedIOException? > I found it will be never even when I interrupt the thread explicitly. I think InterruptedIOException will be thrown only if the selector is blocked in a select operation. Why do not you just use the #shutdown method to gracefully shut down the I/O reactor? Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org