Examples of NotificationHelper


Examples of jade.core.event.NotificationHelper

    getContentManager().registerLanguage(codec, FIPANames.ContentLanguage.FIPA_SL2);
    getContentManager().registerLanguage(codec, FIPANames.ContentLanguage.FIPA_SL);
   
    // Register to be notified about the REATTACHED event in order to handle Main Container faults
    try {
      NotificationHelper helper = (NotificationHelper) getHelper(NotificationService.NAME);
      myContainerListener = new ContainerAdapter() {
        public void reattached(ContainerEvent ev) {
          // The Main Container lost my subscription --> Subscribe again
          send(getSubscribe());
        }
      };
      helper.registerContainerListener(myContainerListener);
    }
    catch (ServiceException se) {
      // Just print a warning since this does not affect the normal operation of a ToolAgent
      logger.log(Logger.WARNING, "NotificationService not installed. Some tool may not work properly.");
    }
View Full Code Here

Examples of jade.core.event.NotificationHelper

  }
 
  private void clean() {
    if (myContainerListener != null) {
      try {
        NotificationHelper helper = (NotificationHelper) getHelper(NotificationService.NAME);
        helper.deregisterContainerListener(myContainerListener);
      }
      catch (ServiceException se) {
        // Just do nothing since this does not affect the normal operation of a ToolAgent
      }
    }
View Full Code Here

Examples of jade.core.event.NotificationHelper

    return observedAgents.isEmpty();
  }
 
  private void suicide() {
    try {
      NotificationHelper helper = (NotificationHelper) getHelper(NotificationService.NAME);
      helper.deregisterMessageListener(this);
      helper.deregisterAgentListener(this);
    }
    catch (Exception e) {
      // Should never happen
      e.printStackTrace();
    }
View Full Code Here

Examples of org.apache.geronimo.concurrent.impl.NotificationHelper

                                                      GeronimoManagedThreadFactorySource threadFactorySource,
                                                      String[] contextHandlerClasses) {
        super(classLoader, corePoolSize, threadFactorySource, contextHandlerClasses);              
        this.name = name;     
       
        NotificationHelper notificationHelper = new NotificationHelper(kernel, name);
        this.threadFactory = new ServerManagedThreadFactory(threadFactorySource.getManagedThreadFactory(), notificationHelper);
    }
View Full Code Here

Examples of org.apache.geronimo.concurrent.impl.NotificationHelper

                                             GeronimoManagedThreadFactorySource threadFactorySource,
                                             String[] contextHandlerClasses) {
        super(classLoader, minPoolSize, maxPoolSize, keepAliveTime, queueCapacity, threadFactorySource, contextHandlerClasses);              
        this.name = name;   
       
        NotificationHelper notificationHelper = new NotificationHelper(kernel, name);
        this.threadFactory = new ServerManagedThreadFactory(threadFactorySource.getManagedThreadFactory(), notificationHelper);
    }
View Full Code Here

Examples of org.apache.geronimo.concurrent.impl.NotificationHelper

    public ManagedThreadGBean(Kernel kernel,
                              ClassLoader classLoader,
                              AbstractName name) {
        this.name = name;
       
        this.notificationHelper = new NotificationHelper(kernel, name);
    }
View Full Code Here

Examples of org.apache.geronimo.concurrent.impl.NotificationHelper

                                     long hungTaskThreshold,
                                     long hungTaskMonitorFrequency) {  
        super(kernel, classLoader);
        this.name = name;
               
        this.notificationHelper = new NotificationHelper(kernel, name);
      
        List<ManagedContextHandler> handlers =
            ContextHandlerUtils.loadHandlers(classLoader, contextHandlerClasses);
       
        this.mainContextHandler = new ManagedContextHandlerChain(handlers);
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.