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.sendHeader(); cqMsg.addStringPart(msgStr); cqMsg.setLastChunk(true);
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.setLastChunkAndNumParts(true, numOfParts); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); chunkedResponseMsg.addObjPart(e); if (numOfParts == 2) {
chunkedResponseMsg.setMessageType(MessageType.RESPONSE); chunkedResponseMsg.setTransactionId(clientMessage.getTransactionId()); chunkedResponseMsg.sendHeader();
chunkedResponseMsg.setLastChunkAndNumParts(true, 2); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); chunkedResponseMsg.addObjPart(e); chunkedResponseMsg.addStringPart(getExceptionTrace(e));
chunkedResponseMsg.setLastChunkAndNumParts(true, 2); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); chunkedResponseMsg.addObjPart(e); chunkedResponseMsg.addStringPart(getExceptionTrace(e));
(logger.isTraceEnabled() ? " list=" + response : "")); replyMsg.sendHeader(); if (listSize > 0) { int chunkSize = 2 * MAXIMUM_CHUNK_SIZE;
(logger.isTraceEnabled() ? " list=" + response : "")); replyMsg.sendHeader(); if (listSize > 0) { int chunkSize = 2 * MAXIMUM_CHUNK_SIZE;
chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); if (e instanceof FunctionException && e.getCause() instanceof InternalFunctionInvocationTargetException) {
chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); if (e instanceof FunctionException && e.getCause() instanceof InternalFunctionInvocationTargetException) {
chunkedResponseMsg.setMessageType(messageType); chunkedResponseMsg.setTransactionId(origMsg.getTransactionId()); chunkedResponseMsg.sendHeader(); if (e instanceof FunctionException && e.getCause() instanceof InternalFunctionInvocationTargetException) {
replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); replyMsg.sendHeader(); int listSize = (response == null) ? 0 : response.size(); if (logger.isDebugEnabled()) {
replyMsg.setMessageType(MessageType.RESPONSE); replyMsg.setTransactionId(origMsg.getTransactionId()); replyMsg.sendHeader(); int listSize = (response == null) ? 0 : response.size(); if (logger.isDebugEnabled()) {
chunkedResponseMsg.sendHeader();