Package org.apache.sandesha2.wsrm

Examples of org.apache.sandesha2.wsrm.TerminateSequenceResponse


    // Generate the Sequence field.
    // -------------------------------
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(Sandesha2Constants.SPEC_VERSIONS.v1_1);

    Sequence sequence = new Sequence(rmNamespaceValue);
    MessageNumber msgNumber = new MessageNumber(rmNamespaceValue);
    msgNumber.setMessageNumber(1);
    sequence.setMessageNumber(msgNumber);
    Identifier id1 = new Identifier(rmNamespaceValue);
    id1.setIndentifer(uuid);
    sequence.setIdentifier(id1);
    applicationRMMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQUENCE, sequence);
View Full Code Here


   
    // Generate the Sequence field.
    // -------------------------------
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(Sandesha2Constants.SPEC_VERSIONS.v1_1);

    Sequence sequence = new Sequence(rmNamespaceValue);
    MessageNumber msgNumber = new MessageNumber(rmNamespaceValue);
    msgNumber.setMessageNumber(1);
    sequence.setMessageNumber(msgNumber);
    Identifier id1 = new Identifier(rmNamespaceValue);
    id1.setIndentifer(uuid);
    sequence.setIdentifier(id1);
    applicationRMMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQUENCE, sequence);
    applicationRMMsg.addSOAPEnvelope();

    // --------------------------------------------
    // Finished generating Sequence part
View Full Code Here

  public static void processLastMessage(RMMsgContext rmMsgCtx) throws AxisFault {
   
    if (!Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmMsgCtx.getRMSpecVersion()))
      return;
   
    Sequence sequence = (Sequence) rmMsgCtx.getMessagePart(Sandesha2Constants.MessageParts.SEQUENCE);
    String sequenceId = sequence.getIdentifier().getIdentifier();
   
    ConfigurationContext configurationContext = rmMsgCtx.getConfigurationContext();
    StorageManager storageManager = SandeshaUtil.getSandeshaStorageManager(
              configurationContext, configurationContext.getAxisConfiguration());
   
View Full Code Here

   
    // Generate the SequenceAck field.
    // -------------------------------
    String rmNamespaceValue = SpecSpecificConstants.getRMNamespaceValue(Sandesha2Constants.SPEC_VERSIONS.v1_1);

    SequenceAcknowledgement sequenceAck = new SequenceAcknowledgement(rmNamespaceValue);
    // Set the sequenceId
    Identifier id = new Identifier(rmNamespaceValue);
    id.setIndentifer(sequenceId);
    sequenceAck.setIdentifier(id);
   
    // Set the Invalid range!
    AcknowledgementRange ackRange = new AcknowledgementRange(rmNamespaceValue);
    ackRange.setLowerValue(1);
    ackRange.setUpperValue(3);
    sequenceAck.addAcknowledgementRanges(ackRange);

    // Set the SequenceAcknowledgement part in the message
    applicationRMMsg.setMessagePart(Sandesha2Constants.MessageParts.SEQ_ACKNOWLEDGEMENT, sequenceAck);
    applicationRMMsg.addSOAPEnvelope();
View Full Code Here

    RMMsgContext closeSeqResponseRMMsg = RMMsgCreator.createCloseSeqResponseMsg(rmMsgCtx, rmdBean);
    MessageContext closeSequenceResponseMsg = closeSeqResponseRMMsg.getMessageContext();

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

        Sandesha2Constants.MessageParts.CREATE_SEQ);
    CreateSequenceResponse createSequenceResponse = (CreateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
    TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    TerminateSequenceResponse terminateSequenceResponse = (TerminateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
    Iterator sequenceAcknowledgementsIter = rmMsgCtx.getMessageParts(
        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();
View Full Code Here

        .getMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    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);

    return createResponseMsg(terminateSeqRMMsg, rmSequenceBean, terminateSequenceResponse,
View Full Code Here

        Sandesha2Constants.MessageParts.CREATE_SEQ);
    CreateSequenceResponse createSequenceResponse = (CreateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
    TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    TerminateSequenceResponse terminateSequenceResponse = (TerminateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
    Iterator sequenceAcknowledgementsIter = rmMsgCtx.getMessageParts(
        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();
View Full Code Here

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

    String namespace = terminateSeqRMMsg.getRMNamespaceValue();
    terminateSeqResponseRMMsg.setRMNamespaceValue(namespace);

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

    SOAPEnvelope envelope = factory.getDefaultEnvelope();
    terminateSeqResponseRMMsg.setSOAPEnvelop(envelope);
    terminateSeqResponseRMMsg.setMessagePart(Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE,
        terminateSequenceResponse);
View Full Code Here

        Sandesha2Constants.MessageParts.CREATE_SEQ);
    CreateSequenceResponse createSequenceResponse = (CreateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE);
    TerminateSequence terminateSequence = (TerminateSequence) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ);
    TerminateSequenceResponse terminateSequenceResponse = (TerminateSequenceResponse) rmMsgCtx.getMessagePart(
        Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE);
    Iterator sequenceAcknowledgementsIter = rmMsgCtx.getMessageParts(
        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) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.APPLICATION);
      sequenceID = sequence.getIdentifier().getIdentifier();
    } else if (sequenceAcknowledgementsIter.hasNext()) {
      rmMsgCtx.setMessageType(Sandesha2Constants.MessageTypes.ACK);
View Full Code Here

TOP

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

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.