Package org.apache.activemq

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


                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


                    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

                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.