Examples of BrokerErrorEvent


Examples of com.sun.messaging.jmq.admin.apps.console.event.BrokerErrorEvent

    /*
     * BEGIN INTERFACE ExceptionListener
     */
    public void onException(JMSException jmse) {
  BrokerErrorEvent bee = null;
        isConnected = false;

  /*
   * Broker initiated connection close.
   */
        if (ClientResources.X_BROKER_GOODBYE == jmse.getErrorCode()) {
      /*
       * Check to see if this BrokerAdminConn has initiated the
       * shutdown.  Only propagate the error message if it is
       * NOT initiated by this BrokerAdminConn.
       */
      if (!isInitiator()) {
                bee = new BrokerErrorEvent(this, BrokerErrorEvent.ALT_SHUTDOWN);
                bee.setBrokerHost(getBrokerHost());
                bee.setBrokerPort(getBrokerPort());
                bee.setBrokerName(getKey());
      }
  /*
   * Broker unexpectedly shutdown.
   */
        } else if (jmse.getLinkedException() instanceof EOFException) {
            bee = new BrokerErrorEvent(this, BrokerErrorEvent.UNEXPECTED_SHUTDOWN);
      bee.setBrokerHost(getBrokerHost());
      bee.setBrokerPort(getBrokerPort());
      bee.setBrokerName(getKey());
  /*
   * Other misc. connection problems.
   */
        } else {
            bee = new BrokerErrorEvent(this, BrokerErrorEvent.CONNECTION_ERROR);
            bee.setBrokerHost(getBrokerHost());
            bee.setBrokerPort(getBrokerPort());
            bee.setBrokerName(getKey());
  }
  if (bee != null)
            fireAdminEventDispatched(bee);
  removeAllAdminEventListeners();
    }
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.