Package com.sun.messaging.jmq.admin.apps.console.event

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


  tmpAction =
      new AbstractAction(acr.getString(acr.I_QUERY_BROKER),
    AGraphics.adminImages[AGraphics.QUERY_BROKER])  {
                    public void actionPerformed(ActionEvent e) {
                BrokerAdminEvent bae = new
        BrokerAdminEvent(this, BrokerAdminEvent.QUERY_BROKER);
                fireAdminEventDispatched(bae);
                    }
          };
        addAction(QUERY_BROKER, tmpAction);
View Full Code Here


                JOptionPane.YES_NO_OPTION,
                JOptionPane.ERROR_MESSAGE, null, close, close[0]);
      return;
  }

        BrokerAdminEvent bae = new BrokerAdminEvent(this,
        BrokerAdminEvent.UPDATE_BROKER_ENTRY);
  bae.setConnectAttempt(false);
  bae.setBrokerName(brokerName);
  bae.setHost(hostTF.getText());
  bae.setPort(Integer.parseInt(portTF.getText()));
  bae.setUsername(userTF.getText());
  bae.setPassword(String.valueOf(passwdTF.getPassword()));
        bae.setOKAction(true);
        fireAdminEventDispatched(bae);
    }
View Full Code Here

            + acr.getString(acr.I_ERROR_CODE, acr.E_NO_BROKER_HOST_PORT),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.ERROR_MESSAGE, null, close, close[0]);
      return;
  }
        BrokerAdminEvent bae = new BrokerAdminEvent(this, BrokerAdminEvent.ADD_BROKER);
  bae.setConnectAttempt(false);
  bae.setBrokerName(brokerName);
  bae.setHost(hostTF.getText());
  bae.setPort(Integer.parseInt(portTF.getText()));
  bae.setUsername(userTF.getText());
  bae.setPassword(String.valueOf(passwdTF.getPassword()));
        bae.setOKAction(true);
        fireAdminEventDispatched(bae);
    }
View Full Code Here

                  return;
      }
  }
  */

        BrokerAdminEvent bae =
      new BrokerAdminEvent(this, BrokerAdminEvent.UPDATE_SVC);

  bae.setPort(portValue);
  bae.setMinThreads(minThreadsValue);
  bae.setMaxThreads(maxThreadsValue);

        bae.setOKAction(true);
        fireAdminEventDispatched(bae);
    }
View Full Code Here

            password.requestFocus();
            return;
  }
  */

  BrokerAdminEvent bae =
    new BrokerAdminEvent(this, BrokerAdminEvent.UPDATE_LOGIN);
  bae.setUsername(usernameValue);
  bae.setPassword(passwordValue);
  bae.setOKAction(true);
  fireAdminEventDispatched(bae);

        username.requestFocus();
        if ((usernameValue.length() != 0) && (passwordValue.length() == 0))
            password.requestFocus();
View Full Code Here

  } else  {
      tmpStr = maxMsgSizeBF.getSizeString();
  }
        setIfNotModified(bkrProps, PROP_NAME_BKR_MAX_MSG_BYTES, tmpStr);

  BrokerAdminEvent  bae;
  bae = new BrokerAdminEvent(this, BrokerAdminEvent.UPDATE_BROKER);
  bae.setBrokerProps(bkrProps);
  bae.setOKAction(true);

  fireAdminEventDispatched(bae);
    }
View Full Code Here

    public void doCancel() {
  hide();
    }

    public void doOK() {
  BrokerAdminEvent bae =
        new BrokerAdminEvent(this, BrokerAdminEvent.UPDATE_DEST);
  DestinationInfo destInfo = getUpdateDestinationInfo();

  bae.setDestinationInfo(destInfo);

        bae.setOKAction(true);
        fireAdminEventDispatched(bae);
    }
View Full Code Here

      (selectedDurName != null) && (selectedClientID != null)) {

      /*
        * Dispatch the admin event.
       */
            BrokerAdminEvent bae =
    new BrokerAdminEvent(this, BrokerAdminEvent.DELETE_DUR);
             bae.setDurableName(selectedDurName);
             bae.setClientID(selectedClientID);
            bae.setOKAction(false);
            fireAdminEventDispatched(bae);
    }
    }
View Full Code Here

      (selectedDurName != null) && (selectedClientID != null)) {

      /*
        * Dispatch the admin event.
       */
            BrokerAdminEvent bae =
    new BrokerAdminEvent(this, BrokerAdminEvent.PURGE_DUR);
             bae.setDurableName(selectedDurName);
             bae.setClientID(selectedClientID);
            bae.setOKAction(false);
            fireAdminEventDispatched(bae);
    }
    }
View Full Code Here

  String destName = nameTF.getText();
  destName = destName.trim();
  int intValue;
  long longValue;

        BrokerAdminEvent bae = new BrokerAdminEvent(this, BrokerAdminEvent.ADD_DEST);

  // Destination name is a must.
  if (!isValidString(destName)) {
      JOptionPane.showOptionDialog(this,
    acr.getString(acr.E_NO_BROKER_DEST_NAME),
    acr.getString(acr.I_ADD_BROKER_DEST),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.ERROR_MESSAGE, null, close, close[0]);
      return;
  } else
            bae.setDestinationName(destName);

  /*
   *  QUEUE-specifics.
   */
  if (queueRB.isSelected()) {
      bae.setDestinationTypeMask(DestType.DEST_TYPE_QUEUE);

      if (activeConsumerUnlimitedRB.isSelected()) {
    bae.setActiveConsumers(UNLIMITED_VALUE_NEG1);  
      } else {
    intValue = Integer.parseInt(activeConsumerIF.getText());
    bae.setActiveConsumers(intValue);
      }

      if (failoverConsumerUnlimitedRB.isSelected()) {
    bae.setFailoverConsumers(UNLIMITED_VALUE_NEG1);  
      } else {
    intValue = Integer.parseInt(failoverConsumerIF.getText());
    bae.setFailoverConsumers(intValue);
      }
 
        /*
         *  TOPIC-specifics.
         */
  } else if (topicRB.isSelected()) {
       bae.setDestinationTypeMask(DestType.DEST_TYPE_TOPIC);
  }

  /*
   *  From here on applies to both queues and topics.
   */

  if (maxProducerUnlimitedRB.isSelected()) {
      bae.setMaxProducers(UNLIMITED_VALUE_NEG1);  
  } else {
      intValue = Integer.parseInt(maxProducerIF.getText());
      bae.setMaxProducers(intValue);
  }
 
  // Set default value unlimited anyway in case if the broker
  // decides to change its default value...
  if (queueSizeLimitUnlimitedRB.isSelected())
      bae.setMaxMesgBytes(UNLIMITED_VALUE_NEG1);
  else {
      longValue = queueSizeLimitBF.getValue();
            bae.setMaxMesgBytes(longValue);
  }

  if (queueMessageLimitUnlimitedRB.isSelected())
      bae.setMaxMesg(UNLIMITED_VALUE_NEG1);
  else {
      String s = queueMessageLimitTF.getText();
            try {
                intValue = Integer.parseInt(s);
            } catch (NumberFormatException nfe) {
          /*
     * Should never happen since queueMessageLimitTF
     * is an IntegerField.
     */
                intValue = -1;
      }

            if (intValue != -1)  {
                bae.setMaxMesg(intValue);
      }
        }
 
        if (destMaxSizePerMsgUnlimitedRB.isSelected())
      bae.setMaxPerMesgSize(UNLIMITED_VALUE_NEG1);
  else {
      longValue = destMaxSizePerMsgBF.getValue();
            bae.setMaxPerMesgSize(longValue);
        }

        bae.setOKAction(true);
        fireAdminEventDispatched(bae);
    }
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.admin.apps.console.event.BrokerAdminEvent

Copyright © 2018 www.massapicom. 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.