Examples of ConsumerImpl


Examples of org.apache.qpid.server.consumer.ConsumerImpl

    public boolean close()
    {
        boolean closed = false;
        State state = getState();

        final ConsumerImpl consumer = getConsumer();

        if(consumer != null)
        {
            consumer.getSendLock();
        }
        try
        {
            while(!closed && state != State.CLOSED)
            {
                closed = updateState(state, State.CLOSED);
                if(!closed)
                {
                    state = getState();
                }
            }
            _creditManager.removeListener(this);
            return closed;
        }
        finally
        {
            if(consumer != null)
            {
                consumer.releaseSendLock();
            }
        }
    }
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

            target = ConsumerTarget_0_8.createGetNoAckTarget(this,
                                                             AMQShortString.EMPTY_STRING, null,
                                                             singleMessageCredit, getDeliveryMethod, getRecordMethod);
        }

        ConsumerImpl sub = queue.addConsumer(target, null, AMQMessage.class, "", options);
        sub.flush();
        sub.close();
        return getDeliveryMethod.hasDeliveredMessage();


    }
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

                    }
                });
            }
            for(MessageSource source : sources)
            {
                ConsumerImpl sub =
                        source.addConsumer(target,
                                           filterManager,
                                           AMQMessage.class,
                                           AMQShortString.toString(tag),
                                           options);
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

        postRollbackTask.run();

        for(MessageInstance entry : _resendList)
        {
            ConsumerImpl sub = entry.getDeliveredConsumer();
            if(sub == null || sub.isClosed())
            {
                entry.release();
            }
            else
            {
                entry.resend();
            }
        }
        _resendList.clear();

        if(requiresSuspend)
        {
            _suspended.set(false);
            for(ConsumerTarget_0_8 target : _tag2SubscriptionTargetMap.values())
            {
                for(ConsumerImpl sub : target.getConsumers())
                {
                    sub.externalStateChange();
                }
            }

        }
    }
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

    }

    @Override
    public ConsumerImpl getAcquiringConsumer()
    {
        ConsumerImpl consumer;
        EntryState state = _state;
        if(state instanceof ConsumerAcquiredState)
        {
            consumer = ((ConsumerAcquiredState)state).getConsumer();
        }
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

    public boolean callback(final long deliveryTag, MessageInstance message)
    {

        message.setRedelivered();
        final ConsumerImpl consumer = message.getDeliveredConsumer();
        if (consumer != null)
        {
            // Consumer exists
            if (!consumer.isClosed())
            {
                _msgToResend.put(deliveryTag, message);
            }
            else // consumer has gone
            {
View Full Code Here

Examples of org.apache.qpid.server.consumer.ConsumerImpl

        }
    }

    private boolean isAcquiredByConsumer(final MessageInstance entry)
    {
        ConsumerImpl acquiringConsumer = entry.getAcquiringConsumer();
        if(acquiringConsumer instanceof QueueConsumer)
        {
            return ((QueueConsumer)acquiringConsumer).getTarget() == this;
        }
View Full Code Here

Examples of org.jboss.ejb3.annotation.impl.ConsumerImpl

         throws Exception
   {
      String ejbName = ejbNames.get(ejbIndex);

      ConsumerContainer container = super.getConsumerContainer(ejbIndex, consumer);
      ConsumerImpl annotation = new ConsumerImpl((Consumer) container
            .resolveAnnotation(Consumer.class));

      container.setAssemblyDescriptor(dd.getAssemblyDescriptor());

      if (consumer != null && !isAnnotatedBean())
      {
         if (consumer.getMessageDestination() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destination", consumer.getMessageDestination());
            annotation.addActivationConfig(property);
         }

         if (consumer.getMessageDestinationType() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destinationType", consumer.getMessageDestinationType());
            annotation.addActivationConfig(property);
         }

         addClassAnnotation(container, Consumer.class, annotation);
      }
View Full Code Here

Examples of org.jboss.ejb3.annotation.impl.ConsumerImpl

         throws Exception
   {
      String ejbName = ejbNames.get(ejbIndex);

      ConsumerContainer container = super.getConsumerContainer(ejbIndex, consumer);
      ConsumerImpl annotation = new ConsumerImpl((Consumer) container
            .resolveAnnotation(Consumer.class));

      container.setAssemblyDescriptor(dd.getAssemblyDescriptor());

      if (consumer != null && !isAnnotatedBean())
      {
         if (consumer.getMessageDestination() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destination", consumer.getMessageDestination());
            annotation.addActivationConfig(property);
         }

         if (consumer.getMessageDestinationType() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destinationType", consumer.getMessageDestinationType());
            annotation.addActivationConfig(property);
         }

         addClassAnnotation(container, Consumer.class, annotation);
      }
View Full Code Here

Examples of org.jboss.ejb3.annotation.impl.ConsumerImpl

         throws Exception
   {
      String ejbName = ejbNames.get(ejbIndex);

      ConsumerContainer container = super.getConsumerContainer(ejbIndex, consumer);
      ConsumerImpl annotation = new ConsumerImpl((Consumer) container
            .resolveAnnotation(Consumer.class));

      container.setAssemblyDescriptor(dd.getAssemblyDescriptor());

      if (consumer != null && !isAnnotatedBean())
      {
         if (consumer.getMessageDestination() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destination", consumer.getMessageDestination());
            annotation.addActivationConfig(property);
         }

         if (consumer.getMessageDestinationType() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destinationType", consumer.getMessageDestinationType());
            annotation.addActivationConfig(property);
         }

         addClassAnnotation(container, Consumer.class, annotation);
      }
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.