this.cons = cons; this.isListener = isListener; if (this.isListener) { cons.setMessageListener(this); }
this.isListener = true;  this.isCC = true;  sess.setMessageListener(this);  this.cc = conn.createConnectionConsumer(dest, null, new MockServerSessionPool(sess), 10);
   public Receiver(Session sess, MessageConsumer cons, int numMessages, boolean isListener) throws Exception   {      super(sess, numMessages);      this.cons = cons;      this.isListener = isListener;      if (this.isListener)      {         cons.setMessageListener(this);      }   }