Examples of Notification


Examples of javax.management.Notification

      manager.declareBean("log", log, Logger.class);
      manager.declareBean("server", server, MBeanServer.class);
      manager.declareBean("manager", alm, AlarmManager.class);

      // test with a dummy notification first, to see if the script is valid
      Notification testNotification = new Notification("jboss.script.test", serviceName, 0);
      manager.declareBean("notification", testNotification, Notification.class);
      manager.declareBean("handback", "", Object.class);

      manager.exec(language, "in-memory-script", 0, 0, script);
View Full Code Here

Examples of javax.management.Notification

   **/   
   public void sendV1()
      throws Exception
   {
      sendNotification(
         new Notification("V1", this, getNextNotificationSequenceNumber(),
                          "V1 test notifications"));
   }
View Full Code Here

Examples of javax.management.Notification

   **/         
   public void sendV2()
      throws Exception
   {
      sendNotification(
         new Notification("V2", this, getNextNotificationSequenceNumber(),
                          "V2 test notifications"));       
   }
View Full Code Here

Examples of javax.management.Notification

   /**
    * @see org.jboss.ha.framework.server.EventFactory#createEvent(java.lang.Object, java.lang.String)
    */
   public Notification createEvent(Object source, String type)
   {
      return new Notification(type, this, this.getNextNotificationSequenceNumber());
   }
View Full Code Here

Examples of javax.management.Notification

         lc.start();
      }
      connectorsRunning = true;

      // Notify listeners that connectors have started processing requests
      sendNotification(new Notification(TOMCAT_CONNECTORS_STARTED, this, getNextNotificationSequenceNumber()));
   }
View Full Code Here

Examples of javax.management.Notification

         throw new IllegalStateException("Must set TomcatDeployer before stopping connectors");
      if (!connectorsRunning)
         return;

      // Notify listeners that connectors have started processing requests
      sendNotification(new Notification(TOMCAT_CONNECTORS_STOPPED, this, getNextNotificationSequenceNumber()));

      MBeanServer server = super.getServer();
      ObjectName service = new ObjectName(tomcatDeployer.getDomain() + ":type=Service,serviceName=jboss.web");
      Object[] args = {};
      String[] sig = {};
View Full Code Here

Examples of javax.management.Notification

  }
 
 
  public void dispatch(int eventType, String message)
  {
    Notification notification = new Notification(String.valueOf(eventType), this, _sequenceNumber++, message);
    sendNotification(notification);
  }
View Full Code Here

Examples of javax.management.Notification

        startTime=System.currentTimeMillis();
       
        // Send j2ee.state.running notification
        if (ok && (this.getObjectName() != null)) {
            Notification notification =
                new Notification("j2ee.state.running", this.getObjectName(),
                                sequenceNumber++);
            broadcaster.sendNotification(notification);
        }

        // Close all JARs right away to avoid always opening a peak number
View Full Code Here

Examples of javax.management.Notification

        // Notify our interested LifecycleListeners
        lifecycle.fireLifecycleEvent(BEFORE_STOP_EVENT, null);
       
        // Send j2ee.state.stopping notification
        if (this.getObjectName() != null) {
            Notification notification =
                new Notification("j2ee.state.stopping", this.getObjectName(),
                                sequenceNumber++);
            broadcaster.sendNotification(notification);
        }
       
        // Mark this application as unavailable while we shut down
        setAvailable(false);

        // Binding thread
        ClassLoader oldCCL = bindThread();

        // Stop our filters
        filterStop();

        // Stop our application listeners
        listenerStop();

        // Stop ContainerBackgroundProcessor thread
        super.threadStop();

        if ((manager != null) && (manager instanceof Lifecycle)) {
            ((Lifecycle) manager).stop();
        }

        // Finalize our character set mapper
        setCharsetMapper(null);

        // Normal container shutdown processing
        if (log.isDebugEnabled())
            log.debug("Processing standard container shutdown");
        // Notify our interested LifecycleListeners
        lifecycle.fireLifecycleEvent(STOP_EVENT, null);
        started = false;

        try {

            // Stop the Valves in our pipeline (including the basic), if any
            if (pipeline instanceof Lifecycle) {
                ((Lifecycle) pipeline).stop();
            }

            // Stop our child containers, if any
            Container[] children = findChildren();
            for (int i = 0; i < children.length; i++) {
                if (children[i] instanceof Lifecycle)
                    ((Lifecycle) children[i]).stop();
            }

            // Clear all application-originated servlet context attributes
            if (context != null)
                context.clearAttributes();

            // Stop resources
            resourcesStop();

            if ((realm != null) && (realm instanceof Lifecycle)) {
                ((Lifecycle) realm).stop();
            }
            if ((cluster != null) && (cluster instanceof Lifecycle)) {
                ((Lifecycle) cluster).stop();
            }
            if ((logger != null) && (logger instanceof Lifecycle)) {
                ((Lifecycle) logger).stop();
            }
            if ((loader != null) && (loader instanceof Lifecycle)) {
                ((Lifecycle) loader).stop();
            }

        } finally {

            // Unbinding thread
            unbindThread(oldCCL);

        }

        // Send j2ee.state.stopped notification
        if (this.getObjectName() != null) {
            Notification notification =
                new Notification("j2ee.state.stopped", this.getObjectName(),
                                sequenceNumber++);
            broadcaster.sendNotification(notification);
        }
       
        // Reset application context
View Full Code Here

Examples of javax.management.Notification

     *
     */
    public void destroy() throws Exception {
        if( oname != null ) {
            // Send j2ee.object.deleted notification
            Notification notification =
                new Notification("j2ee.object.deleted", this.getObjectName(),
                                sequenceNumber++);
            broadcaster.sendNotification(notification);
        }
        super.destroy();

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.