Examples of SequenceOffer


Examples of org.apache.sandesha.ws.rm.SequenceOffer

        if (createSeq.getAcksTo() != null) {
            storageManager.setAcksTo(seqId, createSeq.getAcksTo().getAddress().toString());
        }

        //Support offer
        SequenceOffer offer = createSeq.getOffer();
        boolean offerAccepted = false;
        boolean hasOffer = false;
        if (offer != null) {
            hasOffer = true;
            offerAccepted = acceptOrRejectOffer(offer);
            if (offerAccepted) {
                String responseSeqId = null;
                if (offer != null) {
                    Identifier id = offer.getIdentifier();
                    if (id != null)
                        responseSeqId = id.getIdentifier();
                }
                String incomingSeqId = seqId;
                if (responseSeqId != null) {
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

    CreateSequence createSequencePart = (CreateSequence) createSeqRMMessage
        .getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ);

    SenderBeanMgr retransmitterMgr = storageManager.getSenderBeanMgr();

    SequenceOffer offer = createSequencePart.getSequenceOffer();
    if (offer != null) {
      String offeredSequenceId = offer.getIdentifer().getIdentifier();

      rmsBean.setOfferedSequence(offeredSequenceId);
    }

    MessageContext createSeqMsg = createSeqRMMessage.getMessageContext();
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

     
      CreateSequenceResponse createSeqResPart = (CreateSequenceResponse) createSeqResponse
          .getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
 
        // OFFER PROCESSING
      SequenceOffer offer = createSeqPart.getSequenceOffer();
      if (offer != null) {
        Accept accept = createSeqResPart.getAccept();
        if (accept == null) {
          if (log.isDebugEnabled())
            log.debug(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart));
          FaultManager.makeCreateSequenceRefusedFault(createSeqRMMsg,
                                                      SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart),
                                                      new Exception());
          // Return false if an Exception hasn't been thrown.
          if (log.isDebugEnabled())
            log.debug("Exit: CreateSeqMsgProcessor::processInMessage " + Boolean.FALSE);       
          return false;
        }
 
        // offered seq id
        String offeredSequenceID = offer.getIdentifer().getIdentifier();
       
        boolean offerEcepted = offerAccepted(offeredSequenceID, context, createSeqRMMsg, storageManager);
 
        if (offerEcepted) {
          // Setting the CreateSequence table entry for the outgoing
          // side.
          RMSBean rMSBean = new RMSBean();
          rMSBean.setSequenceID(offeredSequenceID);
          String outgoingSideInternalSequenceId = SandeshaUtil
              .getOutgoingSideInternalSequenceID(rmdBean.getSequenceID());
          rMSBean.setInternalSequenceID(outgoingSideInternalSequenceId);
          // this is a dummy value
          rMSBean.setCreateSeqMsgID(SandeshaUtil.getUUID());
           
          rMSBean.setToEPR(rmdBean.getToEPR());
          rMSBean.setAcksToEPR(rmdBean.getToEPR())// The acks need to flow back into this endpoint
          rMSBean.setReplyToEPR(rmdBean.getReplyToEPR());
          rMSBean.setLastActivatedTime(System.currentTimeMillis());
          rMSBean.setRMVersion(rmdBean.getRMVersion());
          rMSBean.setClientCompletedMessages(new RangeString());
 
          // Setting sequence properties for the outgoing sequence.
          // Only will be used by the server side response path. Will
          // be wasted properties for the client side.
           
          Endpoint endpoint = offer.getEndpoint();
          if (endpoint!=null) {
            // setting the OfferedEndpoint
            rMSBean.setOfferedEndPoint(endpoint.getEPR().getAddress());
          }
   
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

     
      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
        EndpointReference offeredEndpoint = (EndpointReference) applicationMsgContext.getProperty(SandeshaClientConstants.OFFERED_ENDPOINT);
        if (offeredEndpoint==null) {
          EndpointReference replyTo = applicationMsgContext.getReplyTo()//using replyTo as the Endpoint if it is not specified
       
          if (replyTo!=null) {
            offeredEndpoint = SandeshaUtil.cloneEPR(replyTo);
          }
        }
        // Finally fall back to using an anonymous endpoint
        if (offeredEndpoint==null) {
          offeredEndpoint = new EndpointReference(SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespace));
        }
        Endpoint endpoint = new Endpoint (offeredEndpoint, rmNamespaceValue, addressingNamespace);
        offerPart.setEndpoint(endpoint);
      }
    }
   
    String to = rmsBean.getToEPR();
    String replyTo = rmsBean.getReplyToEPR();
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

    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();

      if (outSequenceId != null && !"".equals(outSequenceId)) {

        Accept accept = new Accept(namespace);
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

        if (replyTo!=null)
          offeredEndpoint = SandeshaUtil.cloneEPR(replyTo);
      }
     
      if (offeredSequence != null && !"".equals(offeredSequence)) {
        SequenceOffer offerPart = new SequenceOffer(rmNamespaceValue);
        Identifier identifier = new Identifier(rmNamespaceValue);
        identifier.setIndentifer(offeredSequence);
        offerPart.setIdentifier(identifier);
        createSequencePart.setSequenceOffer(offerPart);
       
        if (Sandesha2Constants.SPEC_2006_08.NS_URI.equals(rmNamespaceValue)) {
          if (offeredEndpoint!=null) {
            Endpoint endpoint = new Endpoint (rmNamespaceValue,addressingNamespaceValue);
            endpoint.setEPR (offeredEndpoint);
            offerPart.setEndpoint(endpoint);
          } else {
            String message = SandeshaMessageHelper.getMessage(
                SandeshaMessageKeys.invalidOfferNoResponseEndpoint);
            throw new SandeshaException (message);
          }
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

    Identifier identifier = new Identifier(rmNamespaceValue);
    identifier.setIndentifer(newSequenceID);

    response.setIdentifier(identifier);

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

      if (outSequenceId != null && !"".equals(outSequenceId)) {

        Accept accept = new Accept(rmNamespaceValue, addressingNamespaceValue);
        EndpointReference acksToEPR = SandeshaUtil.cloneEPR(createSeqMessage.getTo());
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

                                                  // again.
      CreateSequenceResponse createSeqResPart = (CreateSequenceResponse) createSeqResponse
          .getMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);

      // OFFER PROCESSING
      SequenceOffer offer = createSeqPart.getSequenceOffer();
      if (offer != null) {
        Accept accept = createSeqResPart.getAccept();
        if (accept == null) {
          String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.noAcceptPart);
          log.debug(message);
          throw new SandeshaException(message);
        }

        String offeredSequenceID = offer.getIdentifer().getIdentifier(); // offered
                                          // seq.
                                          // id.

        boolean offerEcepted = offerAccepted(offeredSequenceID, context, createSeqRMMsg, storageManager);

        if (offerEcepted) {
          // Setting the CreateSequence table entry for the outgoing
          // side.
          RMSBean rmsBean = new RMSBean();
          rmsBean.setSequenceID(offeredSequenceID);
          String outgoingSideInternalSequenceId = SandeshaUtil
              .getOutgoingSideInternalSequenceID(newSequenceId);
          rmsBean.setInternalSequenceID(outgoingSideInternalSequenceId);
          rmsBean.setCreateSeqMsgID(SandeshaUtil.getUUID()); // this
                                        // is a
                                        // dummy
                                        // value.
         
         
          String outgoingSideSequencePropertyKey = outgoingSideInternalSequenceId;

          RMSBeanMgr rmsBeanMgr = storageManager.getRMSBeanMgr();
          rmsBeanMgr.insert(rmsBean);

          // Setting sequence properties for the outgoing sequence.
          // Only will be used by the server side response path. Will
          // be wasted properties for the client side.

          // setting the out_sequence_id
          SequencePropertyBean outSequenceBean = new SequencePropertyBean();
          outSequenceBean.setName(Sandesha2Constants.SequenceProperties.OUT_SEQUENCE_ID);
          outSequenceBean.setValue(offeredSequenceID);
          outSequenceBean.setSequencePropertyKey(outgoingSideSequencePropertyKey);
          seqPropMgr.insert(outSequenceBean);

          // setting the internal_sequence_id
          SequencePropertyBean internalSequenceBean = new SequencePropertyBean();
          internalSequenceBean.setName(Sandesha2Constants.SequenceProperties.INTERNAL_SEQUENCE_ID);
          internalSequenceBean.setSequencePropertyKey(offeredSequenceID);
          internalSequenceBean.setValue(outgoingSideInternalSequenceId);
          seqPropMgr.insert(internalSequenceBean);
         
          Endpoint endpoint = offer.getEndpoint();
          if (endpoint!=null) {
            // setting the OfferedEndpoint
            SequencePropertyBean offeredEndpointBean = new SequencePropertyBean();
            offeredEndpointBean.setName(Sandesha2Constants.SequenceProperties.OFFERED_ENDPOINT);
         
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

     
      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
        EndpointReference offeredEndpoint = (EndpointReference) applicationMsgContext.getProperty(SandeshaClientConstants.OFFERED_ENDPOINT);
        if (offeredEndpoint==null) {
          EndpointReference replyTo = applicationMsgContext.getReplyTo()//using replyTo as the Endpoint if it is not specified
       
          if (replyTo!=null) {
            offeredEndpoint = SandeshaUtil.cloneEPR(replyTo);
          }
        }
        // Finally fall back to using an anonymous endpoint
        if (offeredEndpoint==null) {
          offeredEndpoint = new EndpointReference(SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespace));
        }
        Endpoint endpoint = new Endpoint (offeredEndpoint, rmNamespaceValue, addressingNamespace);
        offerPart.setEndpoint(endpoint);
      }
    }
   
    String to = rmsBean.getToEPR();
    String replyTo = rmsBean.getReplyToEPR();
View Full Code Here

Examples of org.apache.sandesha2.wsrm.SequenceOffer

    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();

      if (outSequenceId != null && !"".equals(outSequenceId)) {

        Accept accept = new Accept(namespace);
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.