Examples of dispatch()


Examples of javax.mail.event.FolderEvent.dispatch()

    protected void notifyFolderListeners(int type, Folder folder) {
        Iterator it = _folderListeners.iterator();
        FolderEvent event = new FolderEvent(this, folder, type);
        while (it.hasNext()) {
            FolderListener listener = (FolderListener) it.next();
            event.dispatch(listener);
        }
    }

    protected void notifyFolderRenamedListeners(Folder oldFolder,
                                                Folder newFolder) {
View Full Code Here

Examples of javax.mail.event.MailEvent.dispatch()

    MailEvent e = qe.event;
    Vector v = qe.vector;

    for (int i = 0; i < v.size(); i++)
        try {
      e.dispatch(v.elementAt(i));
        } catch (Throwable t) {
      if (t instanceof InterruptedException)
          break loop;
      // ignore anything else thrown by the listener
        }
View Full Code Here

Examples of javax.mail.event.MessageChangedEvent.dispatch()

        Iterator it = _messageChangedListeners.iterator();
        MessageChangedEvent event =
                new MessageChangedEvent(this, type, message);
        while (it.hasNext()) {
            MessageCountEvent listener = (MessageCountEvent) it.next();
            event.dispatch(listener);
        }
    }

    protected void notifyMessageRemovedListeners(boolean removed,
                                                 Message[] messages) {
View Full Code Here

Examples of javax.mail.event.TransportEvent.dispatch()

                        invalid,
                        message);
        Iterator it = _listeners.iterator();
        while (it.hasNext()) {
            TransportListener listener = (TransportListener) it.next();
            event.dispatch(listener);
        }
    }

    public void removeTransportListener(TransportListener listener) {
        _listeners.remove(listener);
View Full Code Here

Examples of javax.naming.event.NamingEvent.dispatch()

        Thread thread = new Thread(new Runnable() {

            public void run() {
                if (event instanceof NamingEvent) {
                    NamingEvent namingEvent = (NamingEvent) event;
                    namingEvent.dispatch(listener);
                } else if (event instanceof NamingExceptionEvent) {
                    NamingExceptionEvent exceptionEvent = (NamingExceptionEvent) event;
                    listener.namingExceptionThrown(exceptionEvent);
                } else if (event instanceof UnsolicitedNotificationEvent) {
                    UnsolicitedNotificationEvent namingEvent = (UnsolicitedNotificationEvent) event;
View Full Code Here

Examples of javax.naming.event.NamingExceptionEvent.dispatch()

  public void testDispatch() {
    log.setMethod("testDispatch()");
    NamingExceptionEvent event;

    event = new NamingExceptionEvent(ctx, ex);
    event.dispatch(new TestListener(event));
  }

  class TestListener implements NamingListener {

    protected NamingExceptionEvent expectedEvent;
View Full Code Here

Examples of javax.naming.ldap.UnsolicitedNotificationEvent.dispatch()

                } else if (event instanceof NamingExceptionEvent) {
                    NamingExceptionEvent exceptionEvent = (NamingExceptionEvent) event;
                    listener.namingExceptionThrown(exceptionEvent);
                } else if (event instanceof UnsolicitedNotificationEvent) {
                    UnsolicitedNotificationEvent namingEvent = (UnsolicitedNotificationEvent) event;
                    namingEvent
                            .dispatch((UnsolicitedNotificationListener) listener);
                }

            }
View Full Code Here

Examples of javax.servlet.AsyncContext.dispatch()

            Thread.currentThread().setName("Async0-Thread");
            log.info("Putting AsyncThread to sleep");
            //Thread.sleep(2 * 1000);
            Thread.sleep(100);
            log.info("Dispatching");
            actx.dispatch();
          } catch (InterruptedException x) {
            log.error("Async1", x);
          } catch (IllegalStateException x) {
            log.error("Async1", x);
          }
View Full Code Here

Examples of jeeves.server.JeevesEngine.dispatch()

      Log.error(Log.REQUEST, sb.toString());
    }

    // --- execute request

    jeeves.dispatch(srvReq, session);
  }
}
View Full Code Here

Examples of jeeves.server.dispatchers.ServiceManager.dispatch()

            session = new UserSession();
        }

        try {
            final ServiceManager serviceManager = context.getBean(ServiceManager.class);
            serviceManager.dispatch(request, session, context);
        } catch (Exception e) {
            Log.error(Log.XLINK_PROCESSOR, "Failed to parse result xml" + request.getService());
            throw new ServiceExecutionFailedException(request.getService(), e);
        } finally {
            // set old context back as thread local
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.