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" 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 any new messages instantly, and push them out via the IDLE
system.
Martin
Sent from my iPhone
On 21 Jan 2013, at 09:30, Eric Charles <e...@apache.org> wrote:
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. In any case, you will have to
also run both in the same Spring context so one can be injected in the other.
If they don't run in the same JVM, you will have to develop an API and extend
James to use it.
Thx,
Eric
On 20/01/2013 17:38, Martin Hewitt wrote:
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
when James loads the mailbox. The REST backend also has a comet function,
so can push messages out to subscribers. How can I link this external
message event with the internal James IMAP IDLE functionality?
Thanks,
Martin
On 7 January 2013 07:30, Eric Charles <e...@apache.org> wrote:
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't have to do
anything on you custom mailbox. mailbox-store will take care of idle for
you.
Thx, Eric
[1] https://svn.apache.org/repos/**asf/james/protocols/trunk/**
imap/src/main/java/org/apache/**james/imap/processor/**IdleProcessor.java<https://svn.apache.org/repos/asf/james/protocols/trunk/imap/src/main/java/org/apache/james/imap/processor/IdleProcessor.java>
On 06/01/2013 12:20, Martin Hewitt wrote:
Hi all,
I noticed that the CAPABILITY command issued to James includes the IDLE
capability and was wondering how James accomplishes this?
Is the logic in the MailboxManager somewhere or the Mail Store? How would
I
go about supporting this in a custom mailbox/mailstore environment?
Thanks,
Martin
------------------------------**------------------------------**---------
To unsubscribe, e-mail:
server-user-unsubscribe@james.**apache.org<server-user-unsubscr...@james.apache.org>
For additional commands, e-mail:
server-user-help@james.apache.**org<server-user-h...@james.apache.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org