if (msgType == MessageType.RESPONSE) { do { msg.receiveChunk(); callback.handle(msg); } while (!msg.isLastChunk()); } else { if (msgType == MessageType.EXCEPTION) { msg.receiveChunk(); Part part = msg.getPart(0); String s = "While performing a remote " + opName; msg.receiveChunk(); Part part = msg.getPart(0); throw new ServerOperationException(part.getString());
if (msgType == MessageType.RESPONSE) { do { keySetResponseMessage.receiveChunk(); Part part = keySetResponseMessage.getPart(0); Object o = part.getObject(); } else { if (msgType == MessageType.EXCEPTION) { keySetResponseMessage.receiveChunk(); Part part = msg.getPart(0); String s = "While performing a remote " + "keySet"; keySetResponseMessage.receiveChunk(); Part part = msg.getPart(0); throw new ServerOperationException(part.getString());
do { chunkedMessage.receiveChunk(); chunkedMessage.receiveChunk(); return null; case MessageType.EXCEPTION: chunkedMessage.receiveChunk(); chunkedMessage.receiveChunk();
if (msgType == MessageType.RESPONSE) { do { getDurableCQsResponseMsg.receiveChunk(); } else { if (msgType == MessageType.EXCEPTION) { getDurableCQsResponseMsg.receiveChunk(); Part part = msg.getPart(0); String s = "While performing a remote GetDurableCQs"; getDurableCQsResponseMsg.receiveChunk(); Part part = msg.getPart(0); throw new ServerOperationException(part.getString());
executeFunctionResponseMsg.receiveChunk(); Object resultResponse = executeFunctionResponseMsg.getPart(0).getObject(); Object result; executeFunctionResponseMsg.receiveChunk(); Part part0 = executeFunctionResponseMsg.getPart(0); Object obj = part0.getObject(); executeFunctionResponseMsg.receiveChunk(); String errorMessage = executeFunctionResponseMsg.getPart(0).getString(); throw new ServerOperationException(errorMessage);
executeFunctionResponseMsg.receiveChunk(); Object resultResponse = executeFunctionResponseMsg.getPart(0).getObject(); Object result; "ExecuteRegionFunctionSingleHopOpImpl#processResponse: received message of type EXCEPTION"); executeFunctionResponseMsg.receiveChunk(); Part part0 = executeFunctionResponseMsg.getPart(0); Object obj = part0.getObject(); "ExecuteRegionFunctionSingleHopOpImpl#processResponse: received message of type EXECUTE_REGION_FUNCTION_ERROR"); executeFunctionResponseMsg.receiveChunk(); String errorMessage = executeFunctionResponseMsg.getPart(0).getString(); throw new ServerOperationException(errorMessage);
@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)); } } }
executeFunctionResponseMsg.receiveChunk(); Object resultResponse = executeFunctionResponseMsg.getPart(0).getObject(); Object result; executeFunctionResponseMsg.receiveChunk(); Part part0 = executeFunctionResponseMsg.getPart(0); Object obj = part0.getObject(); executeFunctionResponseMsg.receiveChunk(); String errorMessage = executeFunctionResponseMsg.getPart(0).getString(); throw new ServerOperationException(errorMessage);