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);