Re: IMAP IDLE architecture

2013-01-21 Thread Eric Charles
Hi Martin, Instead of hooking at the IDLE imap command, you could register your own listener (on mailbox level). That listener will be notified and it could issue the WebSocket call. Thx, Eric On 21/01/2013 18:00, Martin Hewitt wrote: Hi Eric, It looks like I'll have to take the "extend"

Re: IMAP IDLE architecture

2013-01-21 Thread Martin Hewitt
Hi Eric, It looks like I'll have to take the "extend" route. The messaging system is a separate entity that James connects to when a session starts. What I'm looking to achieve is that, when an IDLE command is issued, my extended James code connects to the messaging system via WebSocket, to get

Re: IMAP IDLE architecture

2013-01-21 Thread Eric Charles
Hi Martin, If the REST-backend and James run in the same JVM, it's possible to 'inject' one into the other. I don't get completely your architecture. Does REST receive and forward the messages to James? if yes, how. A small diagram (text based, no need to use a tool) could help to understand.

Re: IMAP IDLE architecture

2013-01-20 Thread Martin Hewitt
Hi Eric, Thanks for this reply, I'm only just getting round to QAing this feature, and I had a question: what happens when "new mail" events occur outside James? In my scenario, James is acting as a wrapper for a REST-based message system. Messages arrive on the REST-based backend and then loaded

Re: IMAP IDLE architecture

2013-01-06 Thread Eric Charles
Hi Martin, The magic is in IdleProcessor [1] which registers a event listener and produces unsolicited responses to the client further to events on the mailbox. The mailbox project is responsible to generate those events. mailbox-store does it for all the mailbox implementations, so you don'