Package org.apache.sandesha2.storage.beanmanagers

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


//      rmMsgCtx.setRelatesTo(null);

    SenderBean input = new SenderBean();
    input.setSend(true);
    input.setReSend(true);
    Collection retransmitterEntriesOfSequence = retransmitterMgr
        .find(input);

    ArrayList ackedMessagesList = new ArrayList ();
    while (ackRangeIterator.hasNext()) {
      AcknowledgementRange ackRange = (AcknowledgementRange) ackRangeIterator
View Full Code Here


    SenderBean target = new SenderBean();
    target.setInternalSequenceID(internalSequenceId);
    target.setSend(false);
    target.setReSend(true);

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

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

    findBean.setSend(true);
    findBean.setReSend(false);
   
    String carrietTo = rmMessageContext.getTo().getAddress();
   
    Collection collection = retransmitterBeanMgr.find(findBean);
   
    Iterator it = collection.iterator();

   
    piggybackLoop:
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 = retransmitterBeanMgr.find(findBean);
      Iterator it = coll.iterator();

      if (it.hasNext()) {
        SenderBean oldAckBean = (SenderBean) it.next();
        timeToSend = oldAckBean.getTimeToSend();    //If there is an old ack. This ack will be sent in the old timeToSend.
View Full Code Here

        senderBean.setSequenceID(sequenceId);
        senderBean.setSend(true);
        senderBean.setReSend(false);
       
        // Find any sender beans for the to address.
        List<SenderBean> 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

    SenderBean findAckBean = new SenderBean ();
    findAckBean.setSequenceID(sequenceId);
    findAckBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
   
    SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();
    Iterator<SenderBean> ackBeans = senderBeanMgr.find(findAckBean).iterator();
    while (ackBeans.hasNext()) {
      SenderBean ackBean = (SenderBean) ackBeans.next();
      senderBeanMgr.delete(ackBean.getMessageID());
     
      storageManager.removeMessageContext(ackBean.getMessageContextRefKey());
View Full Code Here

   
    boolean reallocatedOK = false;
    SenderBeanMgr retransmitterBeanMgr = storageManager.getSenderBeanMgr();

    // removing retransmitterMgr entries and corresponding message contexts.
    Collection<SenderBean> collection = retransmitterBeanMgr.find(internalSequenceId);
    Iterator<SenderBean> iterator = collection.iterator();
    List<MessageContext> msgsToReallocate = null;
    if(reallocateIfPossible){
      msgsToReallocate = new LinkedList<MessageContext>();
    }
View Full Code Here

      // the sequence id.
      SenderBean target = new SenderBean();
      target.setInternalSequenceID(internalSequenceId);
      target.setSend(false);
     
      Iterator<SenderBean> iterator = retransmitterMgr.find(target).iterator();
      while (iterator.hasNext()) {
        SenderBean tempBean = (SenderBean) iterator.next();
 
        // asking to send the application msssage
        tempBean.setSend(true);
View Full Code Here

    SenderBean findBean = new SenderBean();
    findBean.setMessageType(Sandesha2Constants.MessageTypes.ACK);
    findBean.setSend(true);
    findBean.setReSend(false);
    findBean.setSequenceID(sequenceId);
    Collection<SenderBean> coll = retransmitterBeanMgr.find(findBean);
    Iterator<SenderBean> it = coll.iterator();

    while (it.hasNext()) {
      SenderBean oldAckBean = (SenderBean) it.next();
      if (oldAckBean.getTimeToSend() < timeToSend)
View Full Code Here

        findSenderBean.setTimeToSend(System.currentTimeMillis());

        //finding the beans that go with the criteria of the passed SenderBean
        //The reSend flag is ignored for this selection, so there is no need to
        //set it.
        Collection<SenderBean> collection = senderBeanMgr.find(findSenderBean);

        //removing beans that does not pass the resend test
        for (Iterator<SenderBean> it = collection.iterator(); it.hasNext();) {
          SenderBean bean = (SenderBean) it.next();
          if (!bean.isReSend() && bean.getSentCount() > 0)
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.