CreateSequence createSequence = (CreateSequence) rmMsgCtx.getMessagePart(
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) {