• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

HttpURLConnection and nio

Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got an app that runs many (1K+) simultaneous HttpURLConnections, each in a separate thread. It's up for refactoring and I'd like to change this approach to use a selector. I would like, however, to keep the existing architecture, so I'd rather not go straight to the sockets.
The only thing I can think of is to open a channel on each HttpURLConnection.getInputStream() (and maybe getOutputStream() ?). Has anybody done anything similar? I haven't used java.nio yet; is this approach rational?
    Bookmark Topic Watch Topic
  • New Topic