protected void sendHeader() throws IOException { if (logger.isDebugEnabled()) { logger.debug("ServerToClientFunctionResultSender sending header"); } this.setBuffer(); this.msg.setMessageType(messageType); this.msg.setLastChunk(false); this.msg.setNumberOfParts(1); this.msg.sendHeader(); this.headerSent = true; }
protected static void writeKeySetErrorResponse(Message origMsg, int messageType, String message, ServerConnection servConn) throws IOException { // Send chunked response header identifying error message ChunkedMessage chunkedResponseMsg = servConn.getKeySetResponseMessage(); if (logger.isDebugEnabled()) { logger.debug("{}: Sending error message header type: {} transaction: {}", servConn.getName(), messageType, origMsg.getTransactionId()); } chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); // Send actual error if (logger.isDebugEnabled()) { logger.debug("{}: Sending error message chunk: {}", servConn.getName(), message); } chunkedResponseMsg.setNumberOfParts(1); chunkedResponseMsg.setLastChunk(true); chunkedResponseMsg.addStringPart(message); chunkedResponseMsg.sendChunk(servConn); }
cqMsg.setMessageType(msgType); cqMsg.setTransactionId(txId); cqMsg.sendHeader();
protected static void writeChunkedErrorResponse(Message origMsg, int messageType, String message, ServerConnection serverConnection) throws IOException { // Send chunked response header identifying error message ChunkedMessage chunkedResponseMsg = serverConnection.getChunkedResponseMessage(); if (logger.isDebugEnabled()) { logger.debug("{}: Sending error message header type: {} transaction: {}", serverConnection.getName(), messageType, origMsg.getTransactionId()); } chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); // Send actual error if (logger.isDebugEnabled()) { logger.debug("{}: Sending error message chunk: {}", serverConnection.getName(), message); } chunkedResponseMsg.setNumberOfParts(1); chunkedResponseMsg.setLastChunk(true); chunkedResponseMsg.addStringPart(message); chunkedResponseMsg.sendChunk(serverConnection); }
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();
protected static void writeFunctionResponseError(Message origMsg, int messageType, String message, ServerConnection servConn) throws IOException { ChunkedMessage functionResponseMsg = servConn.getFunctionResponseMessage(); ChunkedMessage chunkedResponseMsg = servConn.getChunkedResponseMessage(); if (functionResponseMsg.headerHasBeenSent()) { functionResponseMsg.setNumberOfParts(1); functionResponseMsg.setLastChunk(true); functionResponseMsg.addStringPart(message); if (logger.isDebugEnabled()) { logger.debug("{}: Sending Error chunk while reply in progress: {}", servConn.getName(), message); } functionResponseMsg.sendChunk(servConn); } else { chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setNumberOfParts(1); chunkedResponseMsg.setLastChunk(true); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); chunkedResponseMsg.addStringPart(message); if (logger.isDebugEnabled()) { logger.debug("{}: Sending Error chunk: {}", servConn.getName(), message); } chunkedResponseMsg.sendChunk(servConn); } }
chunkedResponseMsg.setMessageType(MessageType.EXCEPTION); chunkedResponseMsg.setNumberOfParts(numOfParts); chunkedResponseMsg.setLastChunkAndNumParts(true, numOfParts);
servConn.getCache().getCancelCriterion().checkCancelInProgress(null); ChunkedMessage replyMsg = servConn.getChunkedResponseMessage(); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); int listSize = (response == null) ? 0 : response.size(); boolean lastChunk = (i + chunkSize >= listSize); replyMsg.setNumberOfParts(1); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setLastChunk(lastChunk); replyMsg.setTransactionId(origMsg.getTransactionId());
servConn.getCache().getCancelCriterion().checkCancelInProgress(null); ChunkedMessage replyMsg = servConn.getChunkedResponseMessage(); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); int listSize = (response == null) ? 0 : response.size(); boolean lastChunk = (i + chunkSize >= listSize); replyMsg.setNumberOfParts(1); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setLastChunk(lastChunk); replyMsg.setTransactionId(origMsg.getTransactionId());
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();
} else { chunkedResponseMsg.setServerConnection(serverConnection); chunkedResponseMsg.setMessageType(MessageType.EXCEPTION); chunkedResponseMsg.setNumberOfParts(2); chunkedResponseMsg.setLastChunkAndNumParts(true, 2);
} else { chunkedResponseMsg.setServerConnection(serverConnection); chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setNumberOfParts(2); chunkedResponseMsg.setLastChunkAndNumParts(true, 2);
servConn.getCache().getCancelCriterion().checkCancelInProgress(null); ChunkedMessage replyMsg = servConn.getChunkedResponseMessage(); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); replyMsg.sendHeader(); boolean lastChunk = (i + chunkSize >= listSize); replyMsg.setNumberOfParts(1); // resets the message replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setLastChunk(lastChunk); replyMsg.setTransactionId(origMsg.getTransactionId());
servConn.getCache().getCancelCriterion().checkCancelInProgress(null); ChunkedMessage replyMsg = servConn.getChunkedResponseMessage(); replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); replyMsg.sendHeader(); boolean lastChunk = (i + chunkSize >= listSize); replyMsg.setNumberOfParts(1); // resets the message replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setLastChunk(lastChunk); replyMsg.setTransactionId(origMsg.getTransactionId());
functionResponseMsg.sendChunk(serverConnection); } else { chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();