code: public <T extends BasicMessage> void listen(ConsumerConnectionContext context,
              AbstractBasicMessageListener<T> listener) throws JMSException {
          if (context == null) {
              throw new NullPointerException("context must not be null");
          }
          if (listener == null) {
              throw new NullPointerException("listener must not be null");
          }
  
          MessageConsumer consumer = context.getMessageConsumer();
          if (consumer == null) {
              throw new NullPointerException("context had a null consumer");
          }
  
          listener.setConsumerConnectionContext(context);
          consumer.setMessageListener(listener);
      }
docs: Listens for messages.
  
  @param context information that determines where to listen
  @param listener the listener that processes the incoming messages
  @throws JMSException any error
  
  @see org.hawkular.bus.common.ConnectionContextFactory#createConsumerConnectionContext(Endpoint)