if (noData == false) {
// data reply received - pass to application
SC_CACHING_METHOD cachingMethod = SC_CACHING_METHOD.getCachingMethod(reply
.getHeader(SCMPHeaderAttributeKey.CACHING_METHOD));
SCPublishMessage replyToClient = null;
switch (cachingMethod) {
case INITIAL:
case NOT_MANAGED:
replyToClient = new SCPublishMessage();
break;
case APPEND:
replyToClient = new SCAppendMessage();
break;
case REMOVE:
replyToClient = new SCRemovedMessage();
break;
}
replyToClient.setData(reply.getBody());
replyToClient.setDataLength(reply.getBodyLength());
replyToClient.setCompressed(reply.getHeaderFlag(SCMPHeaderAttributeKey.COMPRESSION));
replyToClient.setSessionId(reply.getSessionId());
replyToClient.setMask(reply.getHeader(SCMPHeaderAttributeKey.MASK));
replyToClient.setMessageInfo(reply.getHeader(SCMPHeaderAttributeKey.MSG_INFO));
replyToClient.setAppErrorCode(reply.getHeaderInt(SCMPHeaderAttributeKey.APP_ERROR_CODE));
replyToClient.setAppErrorText(reply.getHeader(SCMPHeaderAttributeKey.APP_ERROR_TEXT));
replyToClient.setCachingMethod(cachingMethod);
replyToClient.setCacheId(reply.getHeader(SCMPHeaderAttributeKey.CACHE_ID));
replyToClient.setCached(reply.getHeaderFlag(SCMPHeaderAttributeKey.CACHED));
// inform service request is completed
this.service.setRequestComplete();
switch (cachingMethod) {
case INITIAL:
case NOT_MANAGED: