Examples of incrementAndGetMsgSequenceNr()


Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      if (responseMessage.isLargeMessage()) {
        // response is large create a large response for reply
        SCMPCompositeSender largeResponse = new SCMPCompositeSender(responseMessage);
        SCMPMessage firstSCMP = largeResponse.getFirst();
        SCMPMessageSequenceNr messageSequenceNr = this.requester.getSCMPMsgSequenceNr();
        firstSCMP.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, messageSequenceNr.incrementAndGetMsgSequenceNr());
        int oti = requestMessage.getHeaderInt(SCMPHeaderAttributeKey.OPERATION_TIMEOUT);
        // adding compositeReceiver to the composite registry
        SCBaseServlet.compositeRegistry.addSCMPLargeResponse(requestMessage.getSessionId(), largeResponse, oti);
        responseMessage = firstSCMP;
      }
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      if (largeResponse.hasNext()) {
        // there are still parts to send to complete request
        SCMPMessage nextSCMP = largeResponse.getNext();
        // handling msgSequenceNr
        SCMPMessageSequenceNr msgSequenceNr = this.requester.getSCMPMsgSequenceNr();
        nextSCMP.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.incrementAndGetMsgSequenceNr());
        this.writeResponse(scmpReq, nextSCMP, response);
        return true;
      }
      SCBaseServlet.compositeRegistry.removeSCMPLargeResponse(sessionId);
    }
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

    if (scmpReq.isPart()) {
      // received message part - request not complete yet
      largeRequest.incomplete();
      // set up poll response
      scmpReply = new SCMPPart(true);
      scmpReply.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.incrementAndGetMsgSequenceNr());
      scmpReply.setIsReply(true);
      scmpReply.setMessageType(scmpReq.getMessageType());
    } else {
      // last message of a chunk message received - request complete now
      largeRequest.complete();
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      scmpReply.setIsReply(true);
      scmpReply.setMessageType(scmpReq.getMessageType());
    } else {
      // last message of a chunk message received - request complete now
      largeRequest.complete();
      largeRequest.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.incrementAndGetMsgSequenceNr());
      scmpReply = largeRequest;
    }

    if (largeRequest != null && largeRequest.isComplete() == false) {
      // request is not complete yet
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

          // sending of a large response has already been started and incoming scmp is a pull request
          if (largeResponse.hasNext()) {
            // there are still parts to send to complete request
            SCMPMessage nextSCMP = largeResponse.getNext();
            // handling msgSequenceNr
            msgSequenceNr.incrementAndGetMsgSequenceNr();
            nextSCMP.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.getCurrentNr());
            response.setSCMP(nextSCMP);
            response.write();
            return;
          }
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

    if (scmpReq.isPart()) {
      // received message part - request not complete yet
      largeRequest.incomplete();
      // set up poll response
      SCMPMessage scmpReply = new SCMPPart(true);
      scmpReply.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.incrementAndGetMsgSequenceNr());
      scmpReply.setIsReply(true);
      scmpReply.setMessageType(scmpReq.getMessageType());
      response.setSCMP(scmpReply);
    } else {
      // last message of a chunk message received - request complete now
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      scmpReply.setMessageType(scmpReq.getMessageType());
      response.setSCMP(scmpReply);
    } else {
      // last message of a chunk message received - request complete now
      largeRequest.complete();
      largeRequest.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.incrementAndGetMsgSequenceNr());
      request.setMessage(largeRequest);
    }
    return largeRequest;
  }
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      // inform callback with scMessages
      srvService.getCallback().deleteSession(scMessage,
          Integer.parseInt(reqMessage.getHeader(SCMPHeaderAttributeKey.OPERATION_TIMEOUT)));
      // handling msgSequenceNr
      SCMPMessageSequenceNr msgSequenceNr = SrvCommandAdapter.sessionCompositeRegistry.getSCMPMsgSequenceNr(sessionId);
      msgSequenceNr.incrementAndGetMsgSequenceNr();
      // set up reply
      SCMPMessage reply = new SCMPMessage();
      reply.setServiceName(serviceName);
      reply.setSessionId(reqMessage.getSessionId());
      reply.setMessageType(this.getKey());
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

    SCMessage scReply = srvService.getCallback().changeSubscription(scMessage,
        Integer.parseInt(reqMessage.getHeader(SCMPHeaderAttributeKey.OPERATION_TIMEOUT)));
    // handling msgSequenceNr
    SCMPMessageSequenceNr msgSequenceNr = SrvCommandAdapter.sessionCompositeRegistry.getSCMPMsgSequenceNr(reqMessage
        .getSessionId());
    msgSequenceNr.incrementAndGetMsgSequenceNr();
    // set up reply
    SCMPMessage reply = new SCMPMessage();
    reply.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSequenceNr.getCurrentNr());
    reply.setServiceName(serviceName);
    reply.setMessageType(this.getKey());
View Full Code Here

Examples of org.serviceconnector.scmp.SCMPMessageSequenceNr.incrementAndGetMsgSequenceNr()

      // inform callback with scMessages
      srvService.getCallback().deleteSession(scMessage,
          Integer.parseInt(reqMessage.getHeader(SCMPHeaderAttributeKey.OPERATION_TIMEOUT)));
      // handling msgSequenceNr
      SCMPMessageSequenceNr msgSequenceNr = SrvCommandAdapter.sessionCompositeRegistry.getSCMPMsgSequenceNr(sessionId);
      msgSequenceNr.incrementAndGetMsgSequenceNr();
      // set up reply - SCMP Version request
      SCMPMessage reply = new SCMPMessage(reqMessage.getSCMPVersion());
      reply.setServiceName(serviceName);
      reply.setSessionId(reqMessage.getSessionId());
      reply.setMessageType(this.getKey());
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.