Examples of Consumer


Examples of org.hornetq.core.server.Consumer

      while (true)
      {
         ConsumerHolder holder = consumerList.get(pos);

         Consumer consumer = holder.consumer;

         Consumer groupConsumer = null;

         // If a group id is set, then this overrides the consumer chosen round-robin

         SimpleString groupID = ref.getMessage().getSimpleStringProperty(Message.HDR_GROUP_ID);
View Full Code Here

Examples of org.hornetq.core.server.Consumer

   public boolean hasMatchingConsumer(final ServerMessage message)
   {
      for (ConsumerHolder holder : consumerList)
      {
         Consumer consumer = holder.consumer;

         if (consumer instanceof Redistributor)
         {
            continue;
         }

         Filter filter1 = consumer.getFilter();

         if (filter1 == null)
         {
            return true;
         }
View Full Code Here

Examples of org.hornetq.core.server.Consumer

         }


         MessageReference ref;

         Consumer handledconsumer = null;

         synchronized (this)
         {

            // Need to do these checks inside the synchronized
            if (paused || consumerList.isEmpty())
            {
               return;
            }

            if (messageReferences.size() == 0)
            {
               break;
            }

            if (endPos < 0 || consumersChanged)
            {
               consumersChanged = false;

               size = consumerList.size();

               endPos = pos -1;

               if (endPos < 0)
               {
                  endPos = size -1;
                  noDelivery = 0;
               }
            }

            ConsumerHolder holder = consumerList.get(pos);

            Consumer consumer = holder.consumer;

            if (holder.iter == null)
            {
               holder.iter = messageReferences.iterator();
            }

            if (holder.iter.hasNext())
            {
               ref = holder.iter.next();
            }
            else
            {
               ref = null;
            }
            if (ref == null)
            {
               noDelivery++;
            }
            else
            {
               if (checkExpired(ref))
               {
                  if (isTrace)
                  {
                     HornetQServerLogger.LOGGER.trace("Reference " + ref + " being expired");
                  }
                  holder.iter.remove();

                  refRemoved(ref);

                  handled++;

                  continue;
               }

               Consumer groupConsumer = null;

               if (isTrace)
               {
                  HornetQServerLogger.LOGGER.trace("Queue " + this.getName() + " is delivering reference " + ref);
               }
View Full Code Here

Examples of org.hornetq.core.server.Consumer

         while (true)
         {
            ConsumerHolder holder = consumerList.get(pos);

            Consumer consumer = holder.consumer;

            Consumer groupConsumer = null;

            // If a group id is set, then this overrides the consumer chosen round-robin

            SimpleString groupID = ref.getMessage().getSimpleStringProperty(Message.HDR_GROUP_ID);
View Full Code Here

Examples of org.jboss.aerogear.controller.router.Consumer

    private static Consumer getConsumer(final RouteContext routeContext, final Map<String, Consumer> consumers,
            final Parameter<?> parameter) {
        final Set<String> mediaTypes = routeContext.getRoute().consumes();
        final Optional<String> contentType = extractContentType(routeContext);
        if (contentType.isPresent()) {
            final Consumer consumer = consumers.get(contentType.get());
            if (consumer != null) {
                return consumer;
            }
        } else {
            for (String mediaType : mediaTypes) {
                final Consumer consumer = consumers.get(mediaType);
                if (consumer != null) {
                    return consumer;
                }
            }
        }
View Full Code Here

Examples of org.jboss.ejb3.annotation.Consumer

   }
   public Map<String, ActivationConfigPropertyMetaData> getActivationConfigProperties()
   {
      Map<String, ActivationConfigPropertyMetaData> result = new HashMap<String, ActivationConfigPropertyMetaData>();
      Consumer annotation = (Consumer) resolveAnnotation(Consumer.class);
      for (ActivationConfigProperty property : annotation.activationConfig())
      {
         addActivationSpecProperty(result, property);
      }
     
      DefaultActivationSpecs defaultSpecsAnnotation = (DefaultActivationSpecs)resolveAnnotation(DefaultActivationSpecs.class);
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.PostOrderDiffWalk.Consumer

            }
        };

        // receives notifications of feature/bucket/tree diffs. Only interested in the "new"/right
        // side of the comparisons
        Consumer consumer = new Consumer() {
            final int bulkSize = 10_000;

            @Override
            public void feature(@Nullable Node left, Node right) {
                add(left);
View Full Code Here

Examples of org.locationtech.geogig.api.plumbing.diff.PreOrderDiffWalk.Consumer

        final List<RuntimeException> producerErrors = new LinkedList<>();

        Thread producerThread = new Thread("DiffTree producer thread") {
            @Override
            public void run() {
                Consumer consumer = diffProducer;
                if (customFilter != null) {// evaluated the latest
                    consumer = new PreOrderDiffWalk.FilteringConsumer(consumer, customFilter);
                }
                if (changeTypeFilter != null) {
                    consumer = new ChangeTypeFilteringDiffConsumer(changeTypeFilter, consumer);
View Full Code Here

Examples of org.servicemix.jbi.deployment.Consumer

        if (sa != null) {
            Connection[] connections = sa.getConnections().getConnection();
            if (connections != null) {
                for (int i = 0; i < connections.length; i++) {
                    Connection connection = connections[i];
                    Consumer consumer = connection.getConsumer();
                    Provider provider = connection.getProvider();
                    QName suName = consumer.getInterfaceName();
                    if (suName != null) {
                        LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                .getComponentConnector(suName);
                        if (lcc != null) {
                            lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                            lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                        }
                        else {
                            throw new DeploymentException("Unable to build connections, can't find consumer interface "
                                    + suName);
                        }
                    }
                    else {
                        // We didn't have the interface so we will go after
                        // the service name and endpoint
                        InternalEndpoint endPoint = (InternalEndpoint) container.getRegistry().getEndpoint(
                                consumer.getServiceName(), consumer.getEndpointName());
                        if (endPoint != null) {
                            LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                    .getComponentConnector(endPoint.getComponentNameSpace());
                            if (lcc != null) {
                                lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                                lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                            }
                            else {
                                throw new DeploymentException(
                                        "Unable to build connections, can't find consumer based on component name space "
                                                + endPoint.getComponentNameSpace());
                            }
                        }
                        else {
                            throw new DeploymentException(
                                    "Unable to build connections, can't find consumer with servicename "
                                            + consumer.getServiceName() + " and endpoint " + consumer.getEndpointName());
                        }
                    }
                }
            }
        }
View Full Code Here

Examples of org.tubo.resource.consumer.Consumer

    }

    protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        if (log.isTraceEnabled()) log.trace(".service() - start");

        Consumer consumer = consumerManager.getConsumer();
        if (consumer instanceof WebConsumer) {
            WebConsumer webConsumer = (WebConsumer)consumer;
            webConsumer.service(this.getServletConfig(),req, res);
        }
        else {
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.