Examples of BrokerEvent


Examples of COM.activesw.api.client.BrokerEvent

        {
           if (destination.getDomain() == Domain.QUEUE.getId())
           {
            synchronized (this)
            {
                final BrokerEvent clientStats = getBrokerClient().getClientStatsById(getRealDestinationName(destination));
                final BrokerField field = clientStats.getField(QUEUE_LENGTH_FIELD) ;
               
                return Integer.parseInt(field.value.toString()) ;
            }
           }
           else
View Full Code Here

Examples of COM.activesw.api.client.BrokerEvent

        {
            QueueAdmin queueAdmin = (QueueAdmin) getHermes().getSession().createQueue(destination.getName()) ;

            synchronized (this)
            {
                final BrokerEvent clientStats = getBrokerClient().getClientStatsById(queueAdmin.getName());

                String[] fieldNames = clientStats.getFieldNames(null) ;
               
                for (int i = 0 ; i < fieldNames.length ; i++)
                {
                    BrokerField field = clientStats.getField(fieldNames[i]) ;
                   
                    if (field.value != null)
                    {
                        rval.put(fieldNames[i], field.value.toString()) ;
                    }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsservice.BrokerEvent

     * @return whether this Broker is allowed to shutdown
     */
    public static boolean imqcmdCanExit (boolean restartRequested) { 
       if (bkrEvtListener  != null) {
         // delegate the decision to the BrokerEventListener
         BrokerEvent event = null;
         if (restartRequested){
           event = new BrokerEvent (broker, BrokerEvent.Type.RESTART, "Broker is requesting restart")
         } else {
           event = new BrokerEvent (broker, BrokerEvent.Type.SHUTDOWN, "Broker is requesting shutdown")
         }
         return bkrEvtListener.exitRequested(event, null);
       }
       return !isInProcess();
    }
View Full Code Here

Examples of com.sun.messaging.jmq.jmsservice.BrokerEvent

           synchronized (Broker.class) {
                 broker = null;
           }
       }
       if (bkrEvtListener  != null) {
             BrokerEvent event = new BrokerEvent (tmp,
                    BrokerEvent.Type.SHUTDOWN, "Broker has been shutdown"); //L10N-XXX
             bkrEvtListener.brokerEvent(event);
             setBrokerEventListener(null);
       }
      
View Full Code Here

Examples of com.sun.messaging.jmq.jmsservice.BrokerEvent

    int start(boolean inProcess, Properties params, BrokerEventListener bel, boolean initOnly) throws OutOfMemoryError,
      IllegalStateException, IllegalArgumentException {
    setBrokerEventListener(bel);
    int startCode = _start(inProcess, params, initOnly);
    if (bkrEvtListener != null) {
      BrokerEvent event = new BrokerEvent(this, BrokerEvent.Type.READY, "Broker has been started"); // L10N-XXX
      bkrEvtListener.brokerEvent(event);
    }
    return startCode;
  }  
View Full Code Here

Examples of com.sun.messaging.jmq.jmsservice.BrokerEvent

        
         // notify that the broker is about to be shut down
         // (ignore value returned by exitRequested())

         if (bkrEvtListener  != null) {
             BrokerEvent event = new BrokerEvent (this, type, reason);
             bkrEvtListener.exitRequested(event, thr);
         }

         // Perform an orderly broker shutdown unless we're in-process,
         // or are going to halt, in which case we want to exit as quickly as possible
         destroyBroker(!exitVM, triggerFailover);

         if (exitVM) {
             if (shutdownHook != null) {
                 ((brokerShutdownHook)shutdownHook).setTriggerFailover(triggerFailover);
             }
             System.exit(status);
         }
         
         // if we're still here we didn't exit the broker
         if (type==BrokerEvent.Type.RESTART){
             // don't attempt to restart an embedded broker
             if (!runningInProcess){
                 // we want to restart, so tell the listener
                 if (tempListener  != null) {   
                     BrokerEvent event = new BrokerEvent (this, type, "Broker restart")
                     tempListener.brokerEvent(event);
                 }
             }
         }
    }
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.