Examples of ConsumerEndpoint


Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

        if (queue == null) {
            throw new JMSException("Cannot create QueueBrowser for null queue");
        }

        ConsumerEndpoint consumer = _consumerMgr.createQueueBrowser(queue,
                                                                    selector);

        _consumer.addConsumer(consumer);
        return consumer.getId();
    }
View Full Code Here

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

            _log.debug("removeConsumer(consumerId=" + consumerId
                       + ") [session="
                       + this + "]");
        }

        ConsumerEndpoint consumer = _consumer.removeConsumer(consumerId);
        _consumerMgr.closeConsumer(consumer);
    }
View Full Code Here

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

            }

            _consumer.stop();
            ConsumerEndpoint[] consumers = _consumer.getConsumers();
            for (int i = 0; i < consumers.length; ++i) {
                ConsumerEndpoint consumer = consumers[i];
                _consumer.removeConsumer(consumer.getId());
                _consumerMgr.closeConsumer(consumer);
            }

            _consumer.close();
View Full Code Here

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

    public int getDurableConsumerMessageCount(String topic, String name) {
        int count = -1;
        try {
            // first see if the cache is loaded in memory
            JmsDestination dest = _destinations.getDestination(topic);
            ConsumerEndpoint endpoint = null;
            if ((dest != null)
                    && ((name != null)
                    || (name.length() > 0))) {

                endpoint = _consumers.getConsumerEndpoint(name);
                if ((endpoint != null)
                        && (endpoint.getDestination().equals(dest))) {
                    // retrieve the number of handles for the endpoint, which
                    // reflects the number of messages
                    count = endpoint.getMessageCount();
                } else {
                    // there is no cache with this name stored in memory. If
                    // this is an administered destination then read the count
                    //  directly from the database.
                    if (dest.getPersistent()) {
View Full Code Here

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

     * @return boolean             true if successful
     */
    public boolean unregisterConsumer(String name) {
        boolean success = false;

        ConsumerEndpoint endpoint = _consumers.getConsumerEndpoint(name);
        if (endpoint != null) {
            _consumers.closeConsumer(endpoint);
        }
        success = true;

View Full Code Here

Examples of org.exolab.jms.messagemgr.ConsumerEndpoint

     * @param name The name of the onsumer.
     * @return boolean True if the consumer is connected.
     */
    public boolean isConnected(String name) {
        boolean result = false;
        ConsumerEndpoint endpoint = _consumers.getConsumerEndpoint(name);
        if (endpoint != null && endpoint instanceof DurableConsumerEndpoint) {
            result = ((DurableConsumerEndpoint) endpoint).isActive();
        }
        return result;
    }
View Full Code Here

Examples of org.jboss.jms.delegate.ConsumerEndpoint

      newRate = is.readFloat();
   }

   public ResponseSupport serverInvoke() throws Exception
   {
      ConsumerEndpoint endpoint =
         (ConsumerEndpoint)Dispatcher.instance.getTarget(objectId);
     
      if (endpoint != null)
      {
         endpoint.changeRate(newRate);
      }
     
      return null;
   }
View Full Code Here

Examples of org.jboss.jms.delegate.ConsumerEndpoint

/* 61 */     this.newRate = is.readFloat();
/*    */   }
/*    */
/*    */   public ResponseSupport serverInvoke() throws Exception
/*    */   {
/* 66 */     ConsumerEndpoint endpoint = (ConsumerEndpoint)Dispatcher.instance.getTarget(this.objectId);
/*    */
/* 69 */     if (endpoint == null)
/*    */     {
/* 71 */       throw new IllegalStateException("Cannot find object in dispatcher with id " + this.objectId);
/*    */     }
/*    */
/* 74 */     endpoint.changeRate(this.newRate);
/*    */
/* 76 */     return null;
/*    */   }
View Full Code Here

Examples of org.jboss.jms.delegate.ConsumerEndpoint

      newRate = is.readFloat();
   }

   public ResponseSupport serverInvoke() throws Exception
   {
      ConsumerEndpoint endpoint =
         (ConsumerEndpoint)Dispatcher.instance.getTarget(objectId);
     
      if (endpoint == null)
      {
         throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
      }
     
      endpoint.changeRate(newRate);
     
      return null;
   }
View Full Code Here

Examples of org.jboss.jms.server.endpoint.ConsumerEndpoint

      newRate = is.readFloat();
   }

   public ResponseSupport serverInvoke() throws Exception
   {
      ConsumerEndpoint endpoint =
         (ConsumerEndpoint)Dispatcher.instance.getTarget(objectId);
     
      if (endpoint == null)
      {
         throw new IllegalStateException("Cannot find object in dispatcher with id " + objectId);
      }
     
      endpoint.changeRate(newRate);
     
      return null;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.