Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.Address


   */
  public boolean processInMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault {
    if(log.isDebugEnabled()) log.debug("Enter: MakeConnectionProcessor::processInMessage " + rmMsgCtx.getSOAPEnvelope().getBody());

    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.MAKE_CONNECTION);
    Address address = makeConnection.getAddress();
    Identifier identifier = makeConnection.getIdentifier();
   
    ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
   
    SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();
   
    //selecting the set of SenderBeans that suit the given criteria.
    SenderBean findSenderBean = new SenderBean ();
    findSenderBean.setSend(true);
    findSenderBean.setTransportAvailable(false);
   
    if (address!=null)
      findSenderBean.setToAddress(address.getAddress());
   
    if (identifier!=null)
      findSenderBean.setSequenceID(identifier.getIdentifier());
   
    // Set the time to send field to be now
View Full Code Here


      identifier.setIndentifer(makeConnectionSeqId);
      makeConnection.setIdentifier(identifier);
    }
   
    if (makeConnectionAnonURI!=null) {
      Address address = new Address (rmNamespaceValue);
      address.setAddress (makeConnectionAnonURI);
      makeConnection.setAddress(address);
    }
   
    //setting the addressing properties
    makeConnectionMessageCtx.setTo(new EndpointReference (referenceMessage.getTo().getAddress()));
View Full Code Here

   * This is processed using a SenderWorker.
   */
  public boolean processInMessage(RMMsgContext rmMsgCtx) throws AxisFault {
   
    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.MAKE_CONNECTION);
    Address address = makeConnection.getAddress();
    Identifier identifier = makeConnection.getIdentifier();
   
    ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configurationContext,configurationContext.getAxisConfiguration());
   
    SenderBeanMgr senderBeanMgr = storageManager.getSenderBeanMgr();
   
    //selecting the set of SenderBeans that suit the given criteria.
    SenderBean findSenderBean = new SenderBean ();
    findSenderBean.setSend(true);
   
    if (address!=null)
      findSenderBean.setWsrmAnonURI(address.getAddress());
   
    if (identifier!=null)
      findSenderBean.setSequenceID(identifier.getIdentifier());
   
    //finding the beans that go with the criteria of the passed SenderBean
View Full Code Here

      identifier.setIndentifer(makeConnectionSeqId);
      makeConnection.setIdentifier(identifier);
    }
   
    if (makeConnectionAnonURI!=null) {
      Address address = new Address (Sandesha2Constants.SPEC_2007_02.MC_NS_URI);
      address.setAddress (makeConnectionAnonURI);
      makeConnection.setAddress(address);
    }
   
    // Setting the addressing properties. As this is a poll we must send it to an non-anon
    // EPR, so we check both To and ReplyTo from the reference message
View Full Code Here

    // ReplyTo will be set only if not null.
    if (replyToEPR != null)
      createSeqRMMsg.setReplyTo(replyToEPR);

    createSequencePart.setAcksTo(new AcksTo(
        new Address(acksToEPR, factory, addressingNamespaceValue), factory,rmNamespaceValue,addressingNamespaceValue));

    createSeqRMMsg.setMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ, createSequencePart);

    try {
View Full Code Here

      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

    //ReplyTo will be set only if not null.
    if (replyToEPR != null)
      createSeqRMMsg.setReplyTo(replyToEPR);

    createSequencePart.setAcksTo(new AcksTo(
        new Address(acksToEPR, factory), factory));

    createSeqRMMsg.setMessagePart(Sandesha2Constants.MessageParts.CREATE_SEQ,
        createSequencePart);

    try {
View Full Code Here

      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

        Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT);
    Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.SEQUENCE);
    Iterator ackRequestedIter = rmMsgCtx.getMessageParts(
        Sandesha2Constants.MessageParts.ACK_REQUEST);
    CloseSequence closeSequence = (CloseSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE);
    CloseSequenceResponse closeSequenceResponse = (CloseSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CLOSE_SEQUENCE_RESPONSE);
    MakeConnection makeConnection = (MakeConnection) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.MAKE_CONNECTION);

    // Setting message type.
    if (createSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ);
    } else if (createSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CREATE_SEQ_RESPONSE);
      sequenceID = createSequenceResponse.getIdentifier().getIdentifier();
    } else if (terminateSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ);
      sequenceID = terminateSequence.getIdentifier().getIdentifier();
    } else if (terminateSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.TERMINATE_SEQ_RESPONSE);
      sequenceID = terminateSequenceResponse.getIdentifier().getIdentifier();
    } else if (rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE) != null) {
     
      Sequence seq = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
      LastMessage lastMessage = seq.getLastMessage();
      SOAPEnvelope envelope = rmMsgCtx.getSOAPEnvelope();
     
      if (lastMessage!=null && envelope.getBody().getFirstOMChild()==null) {
        //the message is an empty body last message
        rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.LAST_MESSAGE);
      }else
        rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.APPLICATION);
     
      sequenceID = sequence.getIdentifier().getIdentifier();
    } else if (sequenceAcknowledgementsIter.hasNext()) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.ACK);
      SequenceAcknowledgement sequenceAcknowledgement = (SequenceAcknowledgement) sequenceAcknowledgementsIter.next();
     
      //if there is only on sequenceAck, sequenceId will be set. Otherwise it will not be.
      if (!sequenceAcknowledgementsIter.hasNext())
        sequenceID = sequenceAcknowledgement.getIdentifier().getIdentifier();
    } else if (ackRequestedIter.hasNext()) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.ACK_REQUEST);
      AckRequested ackRequest = (AckRequested) ackRequestedIter.next();

      //if there is only on sequenceAck, sequenceId will be set. Otherwise it will not be.
      if (!ackRequestedIter.hasNext())
        sequenceID = ackRequest.getIdentifier().getIdentifier();
    } else if (closeSequence != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE);
      sequenceID = closeSequence.getIdentifier().getIdentifier();
    } else if (closeSequenceResponse != null) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.CLOSE_SEQUENCE_RESPONSE);
      sequenceID = closeSequenceResponse.getIdentifier().getIdentifier();
    } else if (makeConnection != null){
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.MAKE_CONNECTION_MSG);
View Full Code Here

  public boolean processInMessage(RMMsgContext rmMsgCtx, Transaction transaction) throws AxisFault {
    if (log.isDebugEnabled())
      log.debug("Enter: CloseSequenceProcessor::processInMessage");

    ConfigurationContext configCtx = rmMsgCtx.getMessageContext().getConfigurationContext();
    CloseSequence closeSequence = (CloseSequence) rmMsgCtx
        .getMessagePart(Sandesha2Constants.MessageParts.CLOSE_SEQUENCE);

    MessageContext msgCtx = rmMsgCtx.getMessageContext();

    String sequenceId = closeSequence.getIdentifier().getIdentifier();
   
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(configCtx, configCtx
        .getAxisConfiguration());

    RMDBean rmdBean = SandeshaUtil.getRMDBeanFromSequenceId(storageManager, sequenceId);
View Full Code Here

TOP

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

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.