Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.SequenceAcknowledgement


        QName headerName = new QName(Sandesha2Constants.SPEC_NS_URIS[i], Sandesha2Constants.WSRM_COMMON.SEQUENCE_ACK);
       
        Iterator acks = header.getChildrenWithName(headerName);
        while(acks.hasNext()) {
          OMElement ack = (OMElement) acks.next();
          SequenceAcknowledgement seqAck = new SequenceAcknowledgement(headerName.getNamespaceURI());
          seqAck.fromOMElement(ack);
          boolean ackPaused = processAckHeader(message, ack, seqAck);
          //if not already paused we might be now
          if(!returnValue){
            returnValue = ackPaused;
          }
View Full Code Here


            QName name = new QName(Sandesha2Constants.SPEC_NS_URIS[i], Sandesha2Constants.WSRM_COMMON.SEQUENCE_ACK);
            Iterator iter = headers.getChildrenWithName(name);
            while(iter.hasNext()) {
              OMElement ackElement = (OMElement) iter.next();

              SequenceAcknowledgement sequenceAcknowledgement = new SequenceAcknowledgement (Sandesha2Constants.SPEC_NS_URIS[i]);
              sequenceAcknowledgement.fromOMElement(ackElement);
             
              sequenceAcknowledgement.toOMElement(appMsgHeaders);
              acks = true;
            }
          }
        }
       
View Full Code Here

     
      //In case of ack messages sequenceId is decided based on the sequenceId of the first
      //sequence Ack. In other words Sandesha2 does not expect to receive two SequenceAcknowledgements
      //of different RM specifications in the same incoming message.
     
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAckIter.next();
      sequenceID = sequenceAcknowledgement.getIdentifier().getIdentifier();
    } else if (messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {
      Iterator ackRequestIter = rmMessageContext
          .getMessageParts(Sandesha2Constants.MessageParts.ACK_REQUEST);
 
      //In case of ack request messages sequenceId is decided based on the sequenceId of the first
View Full Code Here

    RMMsgContext closeSeqResponseRMMsg = RMMsgCreator.createCloseSeqResponseMsg(rmMsgCtx, closeSequenceResponseMsg,
        storageManager);

    while (sequenceAckIter.hasNext()) {
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAckIter.next();
      closeSeqResponseRMMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT,
          sequenceAcknowledgement);
    }
   
    closeSeqResponseRMMsg.setFlow(MessageContext.OUT_FLOW);
View Full Code Here

        QName headerName = new QName(Sandesha2Constants.SPEC_NS_URIS[i], Sandesha2Constants.WSRM_COMMON.SEQUENCE_ACK);
       
        Iterator acks = header.getChildrenWithName(headerName);
        while(acks.hasNext()) {
          OMElement ack = (OMElement) acks.next();
          SequenceAcknowledgement seqAck = new SequenceAcknowledgement(headerName.getNamespaceURI());
          seqAck.fromOMElement(ack);
          processAckHeader(message, ack, seqAck);
        }
      }     
    }
View Full Code Here

      log.debug("Entry: RMMsgCreator::addAckMessage " + sequenceId);
   
    String rmVersion = rmdBean.getRMVersion();
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmVersion);

    SequenceAcknowledgement sequenceAck = new SequenceAcknowledgement(rmNamespaceValue);
    Identifier id = new Identifier(rmNamespaceValue);
    id.setIndentifer(sequenceId);
    sequenceAck.setIdentifier(id);

    ArrayList ackRangeArrayList = SandeshaUtil.getAckRangeArrayList(rmdBean.getServerCompletedMessages(), rmNamespaceValue);
    sequenceAck.setAckRanges(ackRangeArrayList);

    if (rmdBean.isClosed()) {
      // sequence is closed. so add the 'Final' part.
      if (SpecSpecificConstants.isAckFinalAllowed(rmVersion)) {
        AckFinal ackFinal = new AckFinal(rmNamespaceValue);
        sequenceAck.setAckFinal(ackFinal);
      }
    }

    applicationMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT, sequenceAck);
View Full Code Here

     
      //In case of ack messages sequenceId is decided based on the sequenceId of the first
      //sequence Ack. In other words Sandesha2 does not expect to receive two SequenceAcknowledgements
      //of different RM specifications in the same incoming message.
     
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAckIter.next();
      sequenceID = sequenceAcknowledgement.getIdentifier().getIdentifier();
    } else if (messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {
      Iterator ackRequestIter = rmMessageContext
          .getMessageParts(Sandesha2Constants.MessageParts.ACK_REQUEST);
 
      //In case of ack request messages sequenceId is decided based on the sequenceId of the first
View Full Code Here

        sequenceId,  storageManager, true);
   
    // copy over the ack parts
    Iterator iter = ackRMMessage.getMessageParts(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
    while (iter.hasNext()) {
      SequenceAcknowledgement seqAck = (SequenceAcknowledgement) iter.next();
      terminateSeqResponseRMMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT, seqAck);
    }
   
    terminateSeqResponseRMMsg.addSOAPEnvelope();
View Full Code Here

     
      //In case of ack messages sequenceId is decided based on the sequenceId of the first
      //sequence Ack. In other words Sandesha2 does not expect to receive two SequenceAcknowledgements
      //of different RM specifications in the same incoming message.
     
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAckIter.next();
      sequenceID = sequenceAcknowledgement.getIdentifier().getIdentifier();
    } else if (messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {
      Iterator<AckRequested> ackRequestIter = rmMessageContext
          .getAckRequests();
 
      //In case of ack request messages sequenceId is decided based on the sequenceId of the first
View Full Code Here

  public void processInMessage(RMMsgContext terminateSeqRMMsg)
      throws SandeshaException {

    MessageContext terminateSeqMsg = terminateSeqRMMsg.getMessageContext();
    //Processing for ack if any
    SequenceAcknowledgement sequenceAck = (SequenceAcknowledgement) terminateSeqRMMsg
        .getMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
    if (sequenceAck != null) {
      AcknowledgementProcessor ackProcessor = new AcknowledgementProcessor();
      ackProcessor.processInMessage(terminateSeqRMMsg);
    }
View Full Code Here

TOP

Related Classes of org.apache.sandesha2.wsrm.SequenceAcknowledgement

Copyright © 2018 www.massapicom. 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.