Package org.apache.activemq

Examples of org.apache.activemq.MessageAvailableConsumer.receiveNoWait()


                    continue;
                }

                // Look for any available messages
                while (messages < maximumMessages) {
                    message = consumer.receiveNoWait();
                    if (message == null) {
                        break;
                    }
                    messages++;
                    String id = consumerIdMap.get(consumer);
View Full Code Here


                    continue;
                }

                // Look for any available messages
                while (messages < maximumMessages) {
                    message = consumer.receiveNoWait();
                    if (message == null) {
                        break;
                    }
                    messages++;
                    String id = consumerIdMap.get(consumer);
View Full Code Here

                    continue;
                }

                // Look for any available messages
                while (messages < maximumMessages) {
                    message = consumer.receiveNoWait();
                    if (message == null) {
                        break;
                    }
                    messages++;
                    String id = consumerIdMap.get(consumer);
View Full Code Here

                consumer = (MessageAvailableConsumer) consumers.get(i);
                if (consumer.getAvailableListener() == null)
                    continue;

                // Look for any available messages
                message = consumer.receiveNoWait();
                if (log.isDebugEnabled()) {
                    log.debug("received "+message+" from "+consumer);
                }
            }
View Full Code Here

                consumer = (MessageAvailableConsumer) consumers.get(i);
                if (consumer.getAvailableListener() == null)
                    continue;

                // Look for any available messages
                message = consumer.receiveNoWait();
                while (message != null && messages < maximumMessages) {
                    String id = (String) consumerIdMap.get(consumer);
                    writer.print("<response id='");
                    writer.print(id);
                    writer.print("'>");
View Full Code Here

                    writer.print(id);
                    writer.print("'>");
                    writeMessageResponse(writer, message);
                    writer.println("</response>");
                    messages++;
                    message = consumer.receiveNoWait();
                }
            }

            // Add poll message
            // writer.println("<response type='object' id='amqPoll'><ok/></response>");
View Full Code Here

                if (listener == null) {
                    listener = new Listener(consumer);
                    consumer.setAvailableListener(listener);
                }
                // Look for any available messages
                message = consumer.receiveNoWait();

                // Get an existing Continuation or create a new one if there are
                // no events.
                if (message == null) {
                    continuation = ContinuationSupport.getContinuation(request, consumer);
View Full Code Here

                    continuation.suspend(timeout);
                }

                // Try again now
                if (message == null)
                    message = consumer.receiveNoWait();

                // write a responds
                response.setContentType("text/xml");
                PrintWriter writer = response.getWriter();
View Full Code Here

                        if (ajax)
                            writer.println("</response>");

                        // look for next message
                        message = consumer.receiveNoWait();
                        messages++;
                    }
                }

                if (ajax) {
View Full Code Here

                            if (ajax)
                                writer.println("</response>");

                            // look for next message
                            message = consumer.receiveNoWait();
                            messages++;
                        }
                    }
                } finally {
                    client.getSemaphore().release();
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.