Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.Accept


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

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

        Accept accept = new Accept(namespace);

        // Putting the To EPR as the AcksTo for the response sequence. We echo back the
        // addressing version that the create used.
        String addressingNamespace = cs.getAddressingNamespaceValue();
        EndpointReference acksToEPR = createSeqMessage.getTo();
        if(acksToEPR != null) {
          acksToEPR = SandeshaUtil.cloneEPR(acksToEPR);
        } else {
          String anon = SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespace);
          acksToEPR = new EndpointReference(anon);
        }
       
        AcksTo acksTo = new AcksTo(acksToEPR, namespace, cs.getAddressingNamespaceValue());
        accept.setAcksTo(acksTo);
        response.setAccept(accept);
      }
    }

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


   
    // Remove the create sequence message
    storageManager.removeMessageContext(rmsBean.getCreateSequenceMsgStoreKey());
       
    // processing for accept (offer has been sent)
    Accept accept = createSeqResponsePart.getAccept();
    if (accept != null) {

      // TODO this should be detected in the Fault manager.
      if (rmsBean.getOfferedSequence() == null) {
        String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.accptButNoSequenceOffered);
        log.debug(message);
        throw new SandeshaException(message);
      }

      RMDBean rMDBean = new RMDBean();
     
      EndpointReference acksToEPR = accept.getAcksTo().getEPR();
      rMDBean.setAcksToEPR(acksToEPR.getAddress());
      rMDBean.setSequenceID(rmsBean.getOfferedSequence());
      rMDBean.setNextMsgNoToProcess(1);
      rMDBean.setOutboundInternalSequence(rmsBean.getInternalSequenceID());
View Full Code Here

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

     
      //OFFER PROCESSING
      SequenceOffer offer = createSeqPart.getSequenceOffer();
      if (offer != null) {
        Accept accept = createSeqResPart.getAccept();
        if (accept == null) {
          String message = "An accept part has not been generated for the create seq request with an offer part";
          log.debug(message);
          throw new SandeshaException(message);
        }
View Full Code Here

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

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

        Accept accept = new Accept(factory,rmNamespaceValue,addressingNamespaceValue);
        EndpointReference acksToEPR = createSeqMessage.getTo();
        AcksTo acksTo = new AcksTo(factory,rmNamespaceValue,addressingNamespaceValue);
        Address address = new Address(factory,addressingNamespaceValue);
        address.setEpr(acksToEPR);
        acksTo.setAddress(address);
        accept.setAcksTo(acksTo);
        response.setAccept(accept);
      }

    }
View Full Code Here

   
   
    Transaction offerProcessTransaction = storageManager.getTransaction();
   
    //processing for accept (offer has been sent)
    Accept accept = createSeqResponsePart.getAccept();
    if (accept != null) {
      //Find offered sequence from internal sequence id.
      SequencePropertyBean offeredSequenceBean = sequencePropMgr
          .retrieve(internalSequenceId,
              Sandesha2Constants.SequenceProperties.OFFERED_SEQUENCE);

      //TODO this should be detected in the Fault manager.
      if (offeredSequenceBean == null) {
        String message = "No offered sequence entry. But an accept was received";
        log.debug(message);
        throw new SandeshaException(message);
      }

      String offeredSequenceId = (String) offeredSequenceBean.getValue();

      EndpointReference acksToEPR = accept.getAcksTo().getAddress()
          .getEpr();
      SequencePropertyBean acksToBean = new SequencePropertyBean();
      acksToBean.setName(Sandesha2Constants.SequenceProperties.ACKS_TO_EPR);
      acksToBean.setSequenceID(offeredSequenceId);
      acksToBean.setValue(acksToEPR.getAddress());
View Full Code Here

      CreateSequenceResponse createSeqResPart = createSeqResponse.getCreateSequenceResponse();
 
      // 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(),
View Full Code Here

        if (log.isDebugEnabled())
          log.debug(e);         
      }
    } else {
      // processing for accept (offer has been sent)
      Accept accept = createSeqResponsePart.getAccept();
      if (accept != null) {

        // TODO this should be detected in the Fault manager.
        if (rmsBean.getOfferedSequence() == null) {
          String message = SandeshaMessageHelper.getMessage(SandeshaMessageKeys.accptButNoSequenceOffered);
          log.debug(message);
          throw new SandeshaException(message);
        }

        RMDBean rMDBean = new RMDBean();
       
        EndpointReference acksToEPR = accept.getAcksTo().getEPR();
        rMDBean.setAcksToEndpointReference(acksToEPR);
        rMDBean.setSequenceID(rmsBean.getOfferedSequence());
        rMDBean.setNextMsgNoToProcess(1);
        rMDBean.setOutboundInternalSequence(rmsBean.getInternalSequenceID());
View Full Code Here

      if(log.isDebugEnabled()) log.debug("RMMsgCreator:: " + offer);
      String outSequenceId = offer.getIdentifer().getIdentifier();

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

        Accept accept = new Accept(namespace);

        // Putting the To EPR as the AcksTo for the response sequence. We echo back the
        // addressing version that the create used.
        String addressingNamespace = cs.getAddressingNamespaceValue();
        EndpointReference acksToEPR = createSeqMessage.getTo();
        if(acksToEPR != null) {
          acksToEPR = SandeshaUtil.cloneEPR(acksToEPR);
        } else {
          String anon = SpecSpecificConstants.getAddressingAnonymousURI(addressingNamespace);
          acksToEPR = new EndpointReference(anon);
        }
       
        AcksTo acksTo = new AcksTo(acksToEPR, namespace, cs.getAddressingNamespaceValue());
        accept.setAcksTo(acksTo);
        response.setAccept(accept);
      }
    }

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

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

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

        Accept accept = new Accept(factory);
        EndpointReference acksToEPR = createSeqMessage.getTo();
        AcksTo acksTo = new AcksTo(factory);
        Address address = new Address(factory);
        address.setEpr(acksToEPR);
        acksTo.setAddress(address);
        accept.setAcksTo(acksTo);
        response.setAccept(accept);
      }

    }
View Full Code Here

TOP

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

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.