Package org.apache.sandesha2.storage.beanmanagers

Examples of org.apache.sandesha2.storage.beanmanagers.SenderBeanMgr.find()


    String internalSequenceId = (String) internalSequenceBean.getValue();
   
    //removing retransmitterMgr entries
    SenderBean findRetransmitterBean = new SenderBean ();
    findRetransmitterBean.setInternalSequenceId(internalSequenceId);
    Collection collection = retransmitterBeanMgr.find(findRetransmitterBean);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      SenderBean retransmitterBean = (SenderBean) iterator.next();
      retransmitterBeanMgr.delete(retransmitterBean.getMessageId());
    }
View Full Code Here


    String internalSequenceId = (String) internalSequenceBean.getValue();
    findBean.setInternalSequenceId(internalSequenceId);
    findBean.setMessagetype(Sandesha2Constants.MessageTypes.ACK);

    Collection collection = retransmitterBeanMgr.find(findBean);
    Iterator it = collection.iterator();

    if (it.hasNext()) {
      SenderBean ackBean = (SenderBean) it.next();
View Full Code Here

      //removing old acks.
      SenderBean findBean = new SenderBean();
      findBean.setMessagetype(Sandesha2Constants.MessageTypes.ACK);
      findBean.setInternalSequenceId(sequenceId);
      Collection coll = retransmitterBeanMgr.find(findBean);
      Iterator it = coll.iterator();
      while (it.hasNext()) {
        SenderBean retransmitterBean = (SenderBean) it
            .next();
        retransmitterBeanMgr.delete(retransmitterBean.getMessageId());
View Full Code Here

    if (rmMsgCtx.getMessageType() == Sandesha2Constants.MessageTypes.ACK)
      rmMsgCtx.setRelatesTo(null);

    SenderBean input = new SenderBean();
    input.setInternalSequenceId(internalSequenceId);
    Collection retransmitterEntriesOfSequence = retransmitterMgr
        .find(input);

    while (ackRangeIterator.hasNext()) {
      AcknowledgementRange ackRange = (AcknowledgementRange) ackRangeIterator
          .next();
View Full Code Here

    }

    SenderBean target = new SenderBean();
    target.setInternalSequenceId(internalSequenceId);

    Iterator iterator = retransmitterMgr.find(target).iterator();
    while (iterator.hasNext()) {
      SenderBean tempBean = (SenderBean) iterator.next();

      //updating the application message
      String key = tempBean.getKey();
View Full Code Here

        senderBean.setSequenceID(sequenceId);
        senderBean.setSend(true);
        senderBean.setReSend(false);
       
        // Find any sender beans for the to address.
        List beans = senderManager.find(senderBean);
        assertTrue("SenderBeans found when the list should be empty", beans.isEmpty());
       
        SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
       
        assertNotNull(sequenceReport.getSequenceID());
View Full Code Here

      findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);

      // this will be set to true in the sandesha2TransportSender.
      findBean.setSend(true);
      findBean.setReSend(false);
      Collection coll = senderBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        timeToSend = oldAckBean.getTimeToSend(); // If there is an
View Full Code Here

        }
      }
    }

    // removing retransmitterMgr entries and corresponding message contexts.
    Collection collection = senderBeanMgr.find(internalSequenceId);
    Iterator iterator = collection.iterator();
    while (iterator.hasNext()) {
      SenderBean senderBean = (SenderBean) iterator.next();
      senderBeanMgr.delete(senderBean.getMessageID());
View Full Code Here

    SequencePropertyBeanMgr seqPropBeanMgr = storageManager.getSequencePropertyBeanMgr();

    SequencePropertyBean findSeqIDBean = new SequencePropertyBean();
    findSeqIDBean.setValue(internalSequenceID);
    findSeqIDBean.setName(Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID);
    Collection seqIDBeans = seqPropBeanMgr.find(findSeqIDBean);

    if (seqIDBeans.size() == 0) {
      String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noSequenceEstablished);
      log.debug(message);
      throw new SandeshaException(message);
View Full Code Here

    }
   
    //removing sequence properties
    SequencePropertyBean findSequencePropertyBean1 = new SequencePropertyBean ();
    findSequencePropertyBean1.setSequenceID(internalSequenceID);
    collection = sequencePropertyBeanMgr.find(findSequencePropertyBean1);
    iterator = collection.iterator();
    while (iterator.hasNext()) {
      SequencePropertyBean sequencePropertyBean = (SequencePropertyBean) iterator.next();
      doUpdatesIfNeeded (outSequenceID,sequencePropertyBean,sequencePropertyBeanMgr);
     
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.