Exemple #1
0
 public MessageExchangeDAO dequeueMessage(CorrelationKeySet correlationKeySet) {
   // TODO: this thing does not seem to be scalable: loading up based on a correlator???
   for (Iterator<MessageExchangeDAOImpl> itr = _exchanges.iterator(); itr.hasNext(); ) {
     MessageExchangeDAOImpl mex = itr.next();
     if (mex.getCorrelationKeySet().isRoutableTo(correlationKeySet, false)) {
       itr.remove();
       return mex;
     }
   }
   return null;
 }
Exemple #2
0
 public void enqueueMessage(MessageExchangeDAO mex, CorrelationKeySet correlationKeySet) {
   MessageExchangeDAOImpl mexImpl = (MessageExchangeDAOImpl) mex;
   mexImpl.setCorrelationKeySet(correlationKeySet);
   _exchanges.add(mexImpl);
   mexImpl.setCorrelator(this);
 }