Package com.sun.messaging.jmq.util.admin

Examples of com.sun.messaging.jmq.util.admin.ServiceInfo


      return (new Long(-1));
  }
    }

    public Long getNumPktsOut()  {
  ServiceInfo si = ServiceUtil.getServiceInfo(service);
  MetricCounters metrics = si.metrics;
  if (metrics != null)  {
      return (new Long(metrics.packetsOut));
  } else  {
      return (new Long(-1));
View Full Code Here


      return (new Long(-1));
  }
    }

    public Long getPktBytesIn()  {
  ServiceInfo si = ServiceUtil.getServiceInfo(service);
  MetricCounters metrics = si.metrics;
  if (metrics != null)  {
      return (new Long(metrics.packetBytesIn));
  } else  {
      return (new Long(-1));
View Full Code Here

      return (new Long(-1));
  }
    }

    public Long getPktBytesOut()  {
  ServiceInfo si = ServiceUtil.getServiceInfo(service);
  MetricCounters metrics = si.metrics;
  if (metrics != null)  {
      return (new Long(metrics.packetBytesOut));
  } else  {
      return (new Long(-1));
View Full Code Here

      clientID = cse.getClientID(),
      durName = cse.getDurableName(),
      bkrName = ba.getKey(),
      title, msg;
  DestinationInfo dstInfo = cse.getDestinationInfo();
  ServiceInfo svcInfo = cse.getServiceInfo();
  Object refreshObj = ba.getAssociatedObj();

  if (type == BrokerCmdStatusEvent.BROKER_BUSY)  {
      int numRetriesAttempted = cse.getNumRetriesAttempted(),
      maxNumRetries = cse.getMaxNumRetries();
View Full Code Here

  serviceName = bSvcCObj.getServiceInfo().name;
        portValue = bae.getPort();
        minThreadsValue = bae.getMinThreads();
        maxThreadsValue = bae.getMaxThreads();

  ServiceInfo svcInfo = new ServiceInfo();
  svcInfo.setName(serviceName);
  svcInfo.setPort(portValue);
  svcInfo.setMinThreads(minThreadsValue);
  svcInfo.setMaxThreads(maxThreadsValue);

        try {
            ba.sendUpdateServiceMessage(svcInfo);
            ba.receiveUpdateServiceReplyMessage();
View Full Code Here

            BrokerServiceCObj bSvcCObj;
            int i = 0;

            Enumeration e = svcs.elements();
            while (e.hasMoreElements()) {
                ServiceInfo sInfo = (ServiceInfo)e.nextElement();
                bSvcCObj = new BrokerServiceCObj(bCObj, sInfo);
                bSvclCObj.insert(bSvcCObj, i++);
            }
        }
    }
View Full Code Here

            }
        }
    }

    private boolean refreshBrokerServiceCObj(BrokerServiceCObj bSvcCObj) {
        ServiceInfo oldSvcInfo = bSvcCObj.getServiceInfo();
        BrokerAdmin ba = bSvcCObj.getBrokerAdmin();

        /*
         * Broker may take more time to complete the task than the specified
         * timeout value.
         * This value is used when refreshing the console in such cases.
         */
  if (!ba.isBusy())
            ba.setAssociatedObj(bSvcCObj);

        Vector svc = null;
        try {
            ba.sendGetServicesMessage(oldSvcInfo.name);
            /*
             * False because users do not need to know whether
             * or not the operation had succeeded after timeout.
             */
            svc = ba.receiveGetServicesReplyMessage(false);

        } catch (BrokerAdminException baex) {
            JOptionPane.showOptionDialog(app.getFrame(),
                acr.getString(acr.E_RETRIEVE_SVC, oldSvcInfo.name) +
                    printBrokerAdminExceptionDetails(baex),
                acr.getString(acr.I_BROKER_SVC_PROPS) + ": " +
                    acr.getString(acr.I_ERROR_CODE,
                    AdminConsoleResources.E_RETRIEVE_SVC),
                JOptionPane.YES_NO_OPTION,
                JOptionPane.ERROR_MESSAGE, null, close, close[0]);
      return false;
        }

        if ((svc != null) && (svc.size() == 1)) {
            Enumeration e = svc.elements();
            ServiceInfo sInfo = (ServiceInfo)e.nextElement();
            bSvcCObj.setServiceInfo(sInfo);
      return true;
        }
  return false;
    }
View Full Code Here

        }
    }

    private void doPauseService(BrokerServiceCObj bSvcCObj) {
  BrokerAdmin ba = bSvcCObj.getBrokerAdmin();
        ServiceInfo svcInfo = bSvcCObj.getServiceInfo();

        int result = JOptionPane.showConfirmDialog(app.getFrame(),
                acr.getString(acr.Q_SERVICE_PAUSE, svcInfo.name, ba.getKey()),
                acr.getString(acr.I_PAUSE_SERVICE),
                JOptionPane.YES_NO_OPTION);
View Full Code Here

    }

    private void doResumeService(BrokerServiceCObj bSvcCObj) {

  BrokerAdmin ba = bSvcCObj.getBrokerAdmin();
        ServiceInfo svcInfo = bSvcCObj.getServiceInfo();

        int result = JOptionPane.showConfirmDialog(app.getFrame(),
                acr.getString(acr.Q_SERVICE_RESUME, svcInfo.name, ba.getKey()),
                acr.getString(acr.I_RESUME_SERVICE),
                JOptionPane.YES_NO_OPTION);
View Full Code Here

        }
  return bkrProps;
    }

    private ServiceInfo queryServiceInfo(BrokerAdmin ba, String svcName) {
  ServiceInfo svcInfo = null;

        try {
            ba.sendGetServicesMessage(svcName);
            /*
             * False because users do not need to know whether
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.util.admin.ServiceInfo

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.