Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.Identifier


    }

    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);

    CloseSequence closeSequence = new CloseSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(sequenceID);
    closeSequence.setIdentifier(identifier);

    closeSequence.toSOAPEnvelope(dummyEnvelope);

    return dummyEnvelope;
View Full Code Here


      dummyEnvelope = factory.getDefaultEnvelope();
    }

    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(rmSpecVersion);
    TerminateSequence terminateSequence = new TerminateSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(sequenceID);
    terminateSequence.setIdentifier(identifier);
    terminateSequence.toSOAPEnvelope(dummyEnvelope);

    return dummyEnvelope;
  }
View Full Code Here

      if (offeredSequenceId == null || offeredSequenceId.length() == 0) {
        offeredSequenceId = SandeshaUtil.getUUID();
      }

      SequenceOffer offerPart = new SequenceOffer(rmNamespaceValue);
      Identifier identifier = new Identifier(rmNamespaceValue);
      identifier.setIndentifer(offeredSequenceId);
      offerPart.setIdentifier(identifier);
      createSequencePart.setSequenceOffer(offerPart);
     
      if (Sandesha2Constants.SPEC_2007_02.NS_URI.equals(rmNamespaceValue)) {
        // We are going to send an offer, so decide which endpoint to include
View Full Code Here

    if (terminateMessage == null)
      throw new SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.msgContextNotSet));

    TerminateSequence terminateSequencePart = new TerminateSequence(rmNamespaceValue);
    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(rmsBean.getSequenceID());
    terminateSequencePart.setIdentifier(identifier);
    terminateRMMessage.setMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ, terminateSequencePart);

    // no need for an incoming transport for a terminate
    // message. If this is put, sender will look for an response.
View Full Code Here

    CreateSequence cs = (CreateSequence) createSeqMessage.getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ);
    String namespace = createSeqMessage.getRMNamespaceValue();

    CreateSequenceResponse response = new CreateSequenceResponse(namespace);
    Identifier identifier = new Identifier(namespace);
    identifier.setIndentifer(rmSequenceBean.getSequenceID());
    response.setIdentifier(identifier);

    SequenceOffer offer = cs.getSequenceOffer();
    if (offer != null) {
      String outSequenceId = offer.getIdentifer().getIdentifier();
View Full Code Here

    String sequenceID = terminateSequence.getIdentifier().getIdentifier();

    String namespace = terminateSeqRMMsg.getRMNamespaceValue();

    TerminateSequenceResponse terminateSequenceResponse = new TerminateSequenceResponse(namespace);
    Identifier identifier = new Identifier(namespace);
    identifier.setIndentifer(sequenceID);
    terminateSequenceResponse.setIdentifier(identifier);

    String version = SpecSpecificConstants.getSpecVersionString(namespace);
    String action = SpecSpecificConstants.getTerminateSequenceResponseAction(version);
View Full Code Here

    String sequenceID = closeSequence.getIdentifier().getIdentifier();

    String namespace = closeSeqRMMsg.getRMNamespaceValue();

    CloseSequenceResponse closeSequenceResponse = new CloseSequenceResponse(namespace);
    Identifier identifier = new Identifier(namespace);
    identifier.setIndentifer(sequenceID);
    closeSequenceResponse.setIdentifier(identifier);

    String version = SpecSpecificConstants.getSpecVersionString(namespace);
    String action = SpecSpecificConstants.getCloseSequenceResponseAction(version);
View Full Code Here

   
    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);
View Full Code Here

    MessageContext makeConnectionMessageCtx = SandeshaUtil.createNewRelatedMessageContext(referenceRMMessage,makeConnectionOperation);
    RMMsgContext makeConnectionRMMessageCtx = MsgInitializer.initializeMessage(makeConnectionMessageCtx);
   
    MakeConnection makeConnection = new MakeConnection (Sandesha2Constants.SPEC_2007_02.MC_NS_URI);
    if (makeConnectionSeqId!=null) {
      Identifier identifier = new Identifier (rmNamespaceValue);
      identifier.setIndentifer(makeConnectionSeqId);
      makeConnection.setIdentifier(identifier);
    }
   
    if (makeConnectionAnonURI!=null) {
      Address address = new Address (Sandesha2Constants.SPEC_2007_02.MC_NS_URI);
View Full Code Here

    boolean continueSending = MessageRetransmissionAdjuster.adjustRetransmittion(
        rmMsgContext, senderBean, rmMsgContext.getConfigurationContext(), storageManager);
    if(!continueSending) return null;
   
    Identifier id = null;

    if(messageType == Sandesha2Constants.MessageTypes.APPLICATION ||
       messageType == Sandesha2Constants.MessageTypes.LAST_MESSAGE) {
     
      String namespace = SpecSpecificConstants.getRMNamespaceValue(rmVersion);
      Sequence sequence = rmMsgContext.getSequence();
      if(sequence == null) {
        sequence = new Sequence(namespace);
        sequence.setMessageNumber(senderBean.getMessageNumber());

        if(senderBean.isLastMessage() &&
            SpecSpecificConstants.isLastMessageIndicatorRequired(rmVersion)) {
          sequence.setLastMessage(true);
        }
       
        // We just create the id here, we will add the value in later
        id = new Identifier(namespace);
        sequence.setIdentifier(id);
        rmMsgContext.setSequence(sequence);
       
      }
     
    } else if(messageType == Sandesha2Constants.MessageTypes.TERMINATE_SEQ) {
      TerminateSequence terminate = rmMsgContext.getTerminateSequence();
      id = terminate.getIdentifier();

    } else if(messageType == Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE) {
      CloseSequence close = rmMsgContext.getCloseSequence();
      id = close.getIdentifier();
   
    } else if(messageType == Sandesha2Constants.MessageTypes.ACK_REQUEST) {
      // The only time that we can have a message of this type is when we are sending a
      // stand-alone ack request, and in that case we only expect to find a single ack
      // request header in the message.
      Iterator<AckRequested> ackRequests = rmMsgContext.getAckRequests();
      AckRequested ackRequest = ackRequests.next();
      if (ackRequests.hasNext()) {
        throw new SandeshaException (SandeshaMessageHelper.getMessage(SandeshaMessageKeys.ackRequestMultipleParts));
      }
      id = ackRequest.getIdentifier();
    }
   
    // TODO consider adding an extra ack request, as we are about to send the message and we
    // know which sequence it is associated with.
   
    if(id != null && !senderBean.getSequenceID().equals(id.getIdentifier())) {
      id.setIndentifer(senderBean.getSequenceID());

      // Write the changes back into the message context
      rmMsgContext.addSOAPEnvelope();
    } else if(rmMsgContext.getProperty(RMMsgCreator.ACK_TO_BE_WRITTEN) != null){
      rmMsgContext.addSOAPEnvelope();
View Full Code Here

TOP

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

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.