public void sendResponse(Object response, int callId) {
boolean isError = false;
Object clientResponseObject;
if (response instanceof Throwable) {
isError = true;
ClientExceptionConverter converter = ClientExceptionConverters.get(getClientType());
clientResponseObject = converter.convert((Throwable) response);
} else {
clientResponseObject = response != null ? response : new DefaultData();
}
clientEngine.sendResponse(this, clientResponseObject, callId, isError, false);
}