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

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


    }

    public static Consumer readConsumer(DataInputStream dis) throws IOException
    {
        Logger logger = Globals.getLogger();
        ConsumerUID id = null;
        String destName = null;
        String clientID = null;
        String durableName = null;
        String selstr = null;
        boolean isQueue;
View Full Code Here


        long id = dis.readLong(); // UID write
        ConnectionUID conuid = new ConnectionUID(dis.readLong());
        BrokerAddress tempaddr = Globals.getMyAddress();
        BrokerAddress brokeraddr = (BrokerAddress)tempaddr.clone();
        brokeraddr.readBrokerAddress(dis); // UID write
        ConsumerUID cuid = new ConsumerUID(id);
        cuid.setConnectionUID(conuid);
        cuid.setBrokerAddress(brokeraddr);
        return cuid;
    }
View Full Code Here

  Iterator iter = consumerIDs.iterator();

  int i = 0;
  while (iter.hasNext()) {
      ConsumerUID cid = (ConsumerUID)iter.next();
      long conID = cid.longValue();
            String id;

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

        Integer oldid = (Integer)props.get("JMQConsumerID");

       
        if (oldid != null) {
            ConsumerUID newcid = new ConsumerUID();
            Long longcid = new Long(newcid.longValue());
            props.put("JMQConsumerID", longcid);
            consumer_to_deliver.put(longcid, oldid);
        }
          
    }
View Full Code Here

  return (ids);
    }

    public void purge(String consumerID) throws MBeanException {
  ConsumerUID cid = null;

  try  {
      cid = new ConsumerUID(Long.parseLong(consumerID));
  } catch (Exception e)  {
      /*
       * XXX - should  send specific 'cannot parse consumerID' exception
       */
            handleOperationException(ConsumerOperations.PURGE, e);
View Full Code Here

        cxn = checkConnectionId(connectionId, "deleteConsumer");
        session = checkSessionId(sessionId, "deleteConsumer");

  try  {
      if (durableName == null)  {
          ConsumerUID conUID = new ConsumerUID(consumerId);
                protocol.destroyConsumer(conUID, session, cxn);
      } else  {
                protocol.unsubscribe(durableName, clientId);
      }
  } catch(Exception e)  {
View Full Code Here

        cxn = checkConnectionId(connectionId, "setConsumerAsync");
        session = checkSessionId(sessionId, "setConsumerAsync");

  try  {
      ConsumerUID conUID = new ConsumerUID(consumerId);
      con = com.sun.messaging.jmq.jmsserver.core.Consumer.getConsumer(conUID);

            // register it as an asychronous listener
            SessionListener slistener = SessionListener.getListener(session.getSessionUID());
            slistener.setAsyncListener(con, consumer);
View Full Code Here

        cxn = checkConnectionId(connectionId, "fetchMessage");
        session = checkSessionId(sessionId, "fetchMessage");

  SessionListener slistener = SessionListener.getListener(session.getSessionUID());
        ConsumerUID conUID;

  try  {
          conUID = new ConsumerUID(consumerId);
            msg = slistener.getNextConsumerPacket(conUID, timeout);
            if ((msg != null) && acknowledge) {
              TransactionUID txnUID = null;

            if (transactionId != 0)  {
                  txnUID = new TransactionUID(transactionId);
            }
                SysMessageID ids[] = new SysMessageID[1];
                ids[0] = ((Packet)msg).getSysMessageID();
                ConsumerUID cids[] = new ConsumerUID[1];
                cids[0] = conUID;
                Globals.getProtocol().acknowledge(cxn, txnUID, false, AckHandler.ACKNOWLEDGE_REQUEST, null, null, 0, ids, cids);
            }
  } catch(Exception e)  {
      HashMap props = new HashMap();
View Full Code Here

  boolean validate = false;
        TransactionUID txnUID = null;
        int brokerAckType;
        int deliverCnt = -1;
  SysMessageID ids[] = null;
  ConsumerUID cids[] = null;
        Throwable deadThr = null;
  String deadComment = null;
  JMSServiceReply reply;
  HashMap props = new HashMap();
  IMQConnection cxn;

        cxn = checkConnectionId(connectionId, "acknowledgeMessage");

  if (transactionId != 0)  {
      txnUID = new TransactionUID(transactionId);
  }

  brokerAckType = convertToBrokerAckType(ackType);

  ids = new SysMessageID [ 1 ];
  ids[0] = sysMessageID;

  cids = new ConsumerUID [ 1 ];
  cids[0] = new ConsumerUID(consumerId);

  try  {
          /*
       * TBD:
            * validate - should the acks just be validated (normally false)
View Full Code Here

  long transactionId = -1;
        TransactionUID txnUID = null;
        int brokerAckType;
        int deliverCnt = -1;
  SysMessageID ids[] = null;
  ConsumerUID cids[] = null;
        Throwable deadThr = null;
  String deadComment = null;
  JMSServiceReply reply;
  HashMap props = new HashMap();
  IMQConnection cxn;
View Full Code Here

TOP

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

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.