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

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


    private void printAttrs(Properties targetAttrs, boolean printTitle) {
        CommonCmdRunnerUtil.printAttrs(targetAttrs, printTitle, new BrokerCmdPrinter());
    }

    private ServiceInfo getServiceInfoFromAttrs(Properties svcAttrs) {
  ServiceInfo si = new ServiceInfo();

  for (Enumeration e = svcAttrs.propertyNames();  e.hasMoreElements() ;) {
      String propName = (String)e.nextElement(),
       value = svcAttrs.getProperty(propName);
      int    intValue = 0;
      boolean  valueOK = true;
     
      if (propName.equals(PROP_NAME_SVC_PORT))  {
    try  {
        intValue = Integer.parseInt(value);
    } catch (NumberFormatException nfe)  {
        valueOK = false;
    }

    if (valueOK)  {
        si.setPort(intValue);
    }
    continue;
      }

      if (propName.equals(PROP_NAME_SVC_MIN_THREADS))  {
    try  {
        intValue = Integer.parseInt(value);
    } catch (NumberFormatException nfe)  {
        valueOK = false;
    }

    if (valueOK)  {
        si.setMinThreads(intValue);
    }
    continue;
      }

      if (propName.equals(PROP_NAME_SVC_MAX_THREADS))  {
    try  {
        intValue = Integer.parseInt(value);
    } catch (NumberFormatException nfe)  {
        valueOK = false;
    }

    if (valueOK)  {
        si.setMaxThreads(intValue);
    }
    continue;
      }
  }
 
View Full Code Here


                broker.sendGetServicesMessage(svcName);
                Vector svc = broker.receiveGetServicesReplyMessage();

            if ((svc != null) && (svc.size() == 1)) {
                    Enumeration thisEnum = svc.elements();
                    ServiceInfo sInfo = (ServiceInfo)thisEnum.nextElement();
                    BrokerCmdPrinter bcp = new BrokerCmdPrinter(2, 4);
                    String[] row = new String[2];

        bcp.setSortNeeded(false);
View Full Code Here

                broker.sendGetServicesMessage(svcName);
                Vector svc = broker.receiveGetServicesReplyMessage();

                if ((svc != null) && (svc.size() == 1)) {
                    Enumeration thisEnum = svc.elements();
                    ServiceInfo sInfo = (ServiceInfo)thisEnum.nextElement();

                    if (BrokerCmdOptions.PROP_NAME_SVC_PORT.equals(attrName)) {
                        Globals.stdOutPrintln(Integer.toString(sInfo.port));
                        retValue = 0;
View Full Code Here

        broker.sendGetServicesMessage(svcName);
        Vector svc = broker.receiveGetServicesReplyMessage();

        if ((svc != null) && (svc.size() == 1)) {
            Enumeration thisEnum = svc.elements();
            ServiceInfo sInfo = (ServiceInfo)thisEnum.nextElement();

            if (sInfo.type == ServiceType.ADMIN)
    throw new BrokerAdminException(BrokerAdminException.INVALID_OPERATION);
        }
    }
View Full Code Here

        if (!(conObj instanceof BrokerServiceCObj))  {
            return null;
        }

        bSvcCObj = (BrokerServiceCObj)conObj;
  ServiceInfo svcInfo = bSvcCObj.getServiceInfo();

        if (col == 0) {
            return (bSvcCObj);
        } else if (col == 1) {
      String portStr;
View Full Code Here

      handleOperationException(ServiceOperations.RESUME, e);
  }
    }

    private boolean isAdminService()  {
  ServiceInfo si = ServiceUtil.getServiceInfo(service);

  if (si == null)  {
      return (false);
  }
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.