@Override public boolean isSynchronous() { return wrappedRequest.isSynchronous(); }
@Override public Representation handleInbound(Response response) { Representation result = null; // Verify that the request was synchronous if (response.getRequest().isSynchronous()) { if (response.getStatus().isError()) { doError(response.getStatus()); // DO NOT DISPOSE THE RESPONSE. }/* else { */ result = (response == null) ? null : response.getEntity(); /* } */ } return result; }
/** * Handles the inbound call. Note that only synchronous calls are processed. * * @param response * @return The response's entity, if any. */ public Representation handleInbound(Response response) { if (response == null) { return null; } // Verify that the request was synchronous if (response.getRequest().isSynchronous()) { if (response.getStatus().isError()) { doError(response.getStatus()); return null; } return response.getEntity(); } return null; }