try { executeFunctionResponseMsg.readHeader(); switch (executeFunctionResponseMsg.getMessageType()) { case MessageType.EXECUTE_FUNCTION_RESULT:
@Override protected Object processResponse(Message m, Connection con) throws Exception { ChunkedMessage chunkedMessage = (ChunkedMessage) m; chunkedMessage.readHeader(); switch (chunkedMessage.getMessageType()) { case MessageType.RESPONSE_FROM_PRIMARY: {
ChunkedMessage executeFunctionResponseMsg = (ChunkedMessage) msg; try { executeFunctionResponseMsg.readHeader(); switch (executeFunctionResponseMsg.getMessageType()) { case MessageType.EXECUTE_REGION_FUNCTION_RESULT:
@Override protected Object processResponse(Message m) throws Exception { ChunkedMessage msg = (ChunkedMessage) m; msg.readHeader(); int msgType = msg.getMessageType(); msg.receiveChunk(); if (msgType == MessageType.REPLY) { return Boolean.TRUE; } else { if (msgType == MessageType.EXCEPTION) { Part part = msg.getPart(0); String s = "While performing a remote " + getOpName(); throw new ServerOperationException(s, (Throwable) part.getObject()); } else if (isErrorResponse(msgType)) { Part part = msg.getPart(0); // Dan Smith- a hack, but I don't want to change the protocol right // now. We need to throw a security exception so that the exception // will be propagated up properly. Ideally, this exception would be // contained in the message.. String errorMessage = part.getString(); if (errorMessage.indexOf("Not authorized") >= 0) { throw new NotAuthorizedException(errorMessage); } throw new ServerOperationException(errorMessage); } else { throw new InternalGemFireError( "Unexpected message type " + MessageType.getString(msgType)); } } }
final Exception[] exceptionRef = new Exception[1]; keySetResponseMessage.readHeader(); final int msgType = keySetResponseMessage.getMessageType(); if (msgType == MessageType.RESPONSE) {
final Exception[] exceptionRef = new Exception[1]; getDurableCQsResponseMsg.readHeader(); final int msgType = getDurableCQsResponseMsg.getMessageType(); if (msgType == MessageType.RESPONSE) {
executeFunctionResponseMsg.readHeader(); switch (executeFunctionResponseMsg.getMessageType()) { case MessageType.EXECUTE_REGION_FUNCTION_RESULT:
msg.readHeader(); final int msgType = msg.getMessageType(); if (msgType == MessageType.RESPONSE) {