On Dec 19, 2007 4:05 PM, Paulo Sergio <[EMAIL PROTECTED]> wrote: > Hi all! > As some of you know i'm trying to implement IMAP IDLE. while doing it , i > need some way to notify the session of changes in the mailbox. > At the moment i have a service running on james startup, and receiving the > notifications, these notifications are received using jgroups. To achive > this i created a new service that starts at the initialization phase along > with IMAP server and remote management service, i know that Imap extends > from abstractjamesservice, instead my service (the notifications receiver ) > extends from AbstractLogEnabled and implements Serviceable, Configurable, > Disposable, Initializable, ObjectFactory, NotificationProvider. > NotificationProvider is an interface that means that this server can notify > for changes, and that it contains a list of listeners.
sounds good so far > So after this "brief" description here goes the question: how can i register > Imapserver (or imapsession) as a listener for this service? > the idea is that when Imapserver (or imapsession) is notified it writes a > message to the client indicating the changes (folowing IDLE spec) this isn't the only way but i'd approach this by creating an adapter service that depends on both your new service and the imap service. upon initialisation, it registers itself as a listener. when an event is received it performs the appropriate call on the imap service. (FWIW i prefer loosely coupled finely grained systems) - robert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
