public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
public void finish() throws IOException { if (response == null) { throw new IllegalStateException("Null response object"); } // response.setSuspended(true); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void fail() throws IOException { if (isAcknowledged) { throw new IllegalStateException("Already acknowledged"); } isAcknowledged = true; isFailAcknowledgement = true; response.setStatus(HttpStatus.EXPECTATION_FAILED_417); response.finish(); }
@Override public void onError(Throwable t) { LOGGER.log(Level.WARNING, "[onError]", t); response.setStatus(500, t.getMessage()); complete(true); if (response.isSuspended()) { response.resume(); } else { response.finish(); } }
private void doClose() throws IOException { getResponse().finish(); }
/** * Interrupt logic in its own method, so it can be executed either async or sync.<br> cometHandler.onInterrupt is * performed async due to its functionality is unknown, hence not safe to run in the performance critical selector * thread. * * @param handler The {@link CometHandler} encapsulating the suspended connection. * @param finishExecution Finish the current execution. * * @see CometContext#interrupt0(CometHandler, boolean) * @deprecated use the CometContext version */ protected void interrupt0(CometHandler handler, boolean finishExecution) throws IOException { if (finishExecution) { try { handler.onInterrupt(handler.getCometContext().eventInterrupt); } catch (IOException e) { } } handler.getResponse().finish(); }
/** * Interrupt logic in its own method, so it can be executed either async or sync.<br> cometHandler.onInterrupt is * performed async due to its functionality is unknown, hence not safe to run in the performance critical selector * thread. * * @param handler The {@link CometHandler} encapsulating the suspended connection. * @param finishExecution Finish the current execution. * * @see CometContext#interrupt0(CometHandler, boolean) * @deprecated use the CometContext version */ protected void interrupt0(CometHandler handler, boolean finishExecution) throws IOException { if (finishExecution) { try { handler.onInterrupt(handler.getCometContext().eventInterrupt); } catch (IOException e) { } } handler.getResponse().finish(); }
/** * Interrupt logic in its own method, so it can be executed either async or sync.<br> cometHandler.onInterrupt is * performed async due to its functionality is unknown, hence not safe to run in the performance critical selector * thread. * * @param handler The {@link CometHandler} encapsulating the suspended connection. * @param finishExecution Finish the current execution. * * @see CometContext#interrupt0(CometHandler, boolean) * @deprecated use the CometContext version */ protected void interrupt0(CometHandler handler, boolean finishExecution) throws IOException { if (finishExecution) { try { handler.onInterrupt(handler.getCometContext().eventInterrupt); } catch (IOException e) { } } handler.getResponse().finish(); }
/** * Interrupt logic in its own method, so it can be executed either async or sync.<br> cometHandler.onInterrupt is * performed async due to its functionality is unknown, hence not safe to run in the performance critical selector * thread. * * @param handler The {@link CometHandler} encapsulating the suspended connection. * @param finishExecution Finish the current execution. * * @see CometContext#interrupt0(CometHandler, boolean) * @deprecated use the CometContext version */ protected void interrupt0(CometHandler handler, boolean finishExecution) throws IOException { if (finishExecution) { try { handler.onInterrupt(handler.getCometContext().eventInterrupt); } catch (IOException e) { } } handler.getResponse().finish(); }
/** * Interrupt logic in its own method, so it can be executed either async or sync.<br> cometHandler.onInterrupt is * performed async due to its functionality is unknown, hence not safe to run in the performance critical selector * thread. * * @param handler The {@link CometHandler} encapsulating the suspended connection. * @param finishExecution Finish the current execution. * * @see CometContext#interrupt0(CometHandler, boolean) * @deprecated use the CometContext version */ protected void interrupt0(CometHandler handler, boolean finishExecution) throws IOException { if (finishExecution) { try { handler.onInterrupt(handler.getCometContext().eventInterrupt); } catch (IOException e) { } } handler.getResponse().finish(); }
private void reportAuthFailure(final Response res, final ActionReport report, final String msgKey, final String msg, final int httpStatus, final String headerName, final String headerValue) throws IOException { report.setActionExitCode(ActionReport.ExitCode.FAILURE); final String messageForResponse = adminStrings.getLocalString(msgKey, msg); report.setMessage(messageForResponse); report.setActionDescription("Authentication error"); res.setStatus(httpStatus, messageForResponse); if (headerName != null) { res.setHeader(headerName, headerValue); } res.setContentType(report.getContentType()); report.writeReport(res.getOutputStream()); res.getOutputStream().flush(); res.finish(); }