my dog learned polymorphism
The moose likes Sockets and Internet Protocols and the fly likes Nonblocking socket for IMAP Client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "Nonblocking socket for IMAP Client" Watch "Nonblocking socket for IMAP Client" New topic
Author

Nonblocking socket for IMAP Client

Bhiku Mhatre
Ranch Hand

Joined: Feb 11, 2002
Posts: 33
I am looking for any pointers for enabling me to write a non-blocking socket type of IMAP client.
What does JavaMail do? Can that be used for this purpose? Will that be blocking the calls over the connection.. if yes, what could be the workaround for making it non-blocking?
I'd like not to implement the IMAP client spec by myself, and reuse the one Sun provides with JavaMail.
Any help will be greatly appreciated!
thanks!
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24050
    
  13

The java.nio package does have support for non-blocking I/O, but I'm not sure what the benefit of using this would be for IMAP, which is a request/response protocol. Perhaps what you're really interested in is having a GUI be responsive during the IMAP interaction? In that case, what you want to do is just spawn a separate Thread in which to do the communications.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Nonblocking socket for IMAP Client
 
Similar Threads
non blocking socket
JavaMail API: how to use nonblocking sockets for IMAP?
Java Mail Server
Servlet communication
[ nio ] Why should I use non-blocking ServerSocketChannels ?