Package com.sun.messaging.jmq.jmsserver.core

Examples of com.sun.messaging.jmq.jmsserver.core.ProducerUID


  Iterator iter = producerIDs.iterator();

  int i = 0;
  while (iter.hasNext()) {
      ProducerUID pid = (ProducerUID)iter.next();
      long prdID = pid.longValue();
      String id;

      try  {
                id = Long.toString(prdID);
View Full Code Here


      return (new Integer(0));
  }

  int count = 0;
  while (producers.hasNext()) {
      ProducerUID pid = (ProducerUID)producers.next();
      Producer oneProd = Producer.getProducer(pid);

      /*
       * If wildcard param is not null, check for matches
       * If it is null, return total count of wildcards
View Full Code Here

  if (producers == null)  {
      return (null);
  }

  while (producers.hasNext()) {
      ProducerUID pid = (ProducerUID)producers.next();
      Producer oneProd = Producer.getProducer(pid);

      DestinationUID id = oneProd.getDestinationUID();
      al.add(id.getName());
  }
View Full Code Here

           if (msg.getFlowPaused()) {
               con.flowPaused(0);
               msg.setFlowPaused(false);
           }
           long pid = msg.getProducerID();
           ProducerUID puid = new ProducerUID(pid);
           Producer p = Producer.getProducer(puid);
           if (p != null)
               p.addMsg(); // increment counter
           // see if we need to resume flow
           if (msg.getConsumerFlow()) {
View Full Code Here

            }
        } else if (cmd.equals("resume")) {
            // session, connection, consumerUID, producer
            if (cmdarg.equals("prd")) {
                try {
                    ProducerUID pid = new ProducerUID(
                        Long.parseLong(target));
                    Producer pr = Producer.getProducer(pid);
                    Destination d = Destination.getDestination(
                          pr.getDestinationUID());
                    logger.log(Logger.INFO,"Resuming " + pr);
View Full Code Here

            }
        } else if (arg.equals("prd")) {
            if (target == null) {
                return Producer.getAllDebugState();
            } else {
                ProducerUID uid = new ProducerUID(
                      Long.parseLong(target));
                return getProducerInfo(uid);
            }
        } else if (arg.equals("con")) {
            if (target == null) {
View Full Code Here

        ht.put("producerCnt", String.valueOf(producers.size()));
        if (producers.size() > 0) {
            Vector v = new Vector();
            Iterator itr = producers.keySet().iterator();
            while (itr.hasNext()) {
                ProducerUID p = (ProducerUID)itr.next();
                v.add(p.toString());
            }
            ht.put("producers", v);
        }
        ht.put("msgsToConsumer", String.valueOf(msgsToConsumer));
        ht.put("sessionCnt", String.valueOf(sessions.size()));
        if (sessions.size() > 0) {
            Vector v = new Vector();
            Iterator itr = sessions.values().iterator();
            while (itr.hasNext()) {
                Session p = (Session)itr.next();
                v.add(p.getSessionUID().toString());
            }
            ht.put("sessions", v);
        }
        ht.put("busySessionCnt", String.valueOf(busySessions.size()));
        if (busySessions.size() > 0) {
             Vector v = new Vector();
             Iterator itr = busySessions.iterator();
             while (itr.hasNext()) {
                Session p = (Session)itr.next();
                v.add(p.getSessionUID().toString());
             }
             ht.put("busySessions", v);
        }
        ht.put("tempDestCnt", String.valueOf(tmpDestinations.size()));
        if (tmpDestinations.size() > 0) {
             Vector v = new Vector();
             Iterator itr = tmpDestinations.iterator();
             while (itr.hasNext()) {
                DestinationUID p = (DestinationUID)itr.next();
                v.add(p.toString());
             }
             ht.put("tempDestinations", v);
        }
        ht.put("runningMsgs", String.valueOf(runningMsgs));
        ht.put("paused", String.valueOf(paused));
View Full Code Here

  Iterator iter = producerIDs.iterator();

  int i = 0;
  while (iter.hasNext()) {
      ProducerUID pid = (ProducerUID)iter.next();
      long prdID = pid.longValue();
      String id;

      try  {
                id = Long.toString(prdID);
View Full Code Here

    }

    public static CompositeData getProducerInfo(String producerID)
        throws BrokerException, OpenDataException  {
  CompositeData cd = null;
  ProducerUID pid = null;
        BrokerResources  rb = Globals.getBrokerResources();

  if (producerID == null)  {
      throw new
    IllegalArgumentException(rb.getString(rb.X_JMX_NULL_PRODUCER_ID_SPEC));
  }

  long longPid = 0;

  try  {
      longPid = Long.parseLong(producerID);
  } catch (NumberFormatException e)  {
      throw new
    IllegalArgumentException(rb.getString(rb.X_JMX_INVALID_PRODUCER_ID_SPEC, producerID));
  }

  pid = new ProducerUID(longPid);

  if (pid == null)  {
      throw new BrokerException(rb.getString(rb.X_JMX_PRODUCER_NOT_FOUND, producerID));
  }
View Full Code Here

  IMQConnection cxn;

        cxn = checkConnectionId(connectionId, "deleteProducer");

  try  {
            protocol.removeProducer(new ProducerUID(producerId),
      cxn, new Object().toString());
  } catch(Exception e)  {
      String errStr = "deleteProducer: Delete producer failed. Connection ID: "
      + connectionId
      + ", session ID: "
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.jmsserver.core.ProducerUID

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.