@Override public long flush() throws Exception { try { return queue.flush(); } catch (MailQueueException e) { throw new Exception(e.getMessage()); } }
private Response forceDelayedMailsDelivery(Request request, Response response) throws JsonExtractException, MailQueueException { assertDelayedParamIsTrue(request); assertPayloadContainsDelayedEntry(request); ManageableMailQueue mailQueue = assertMailQueueExists(request); mailQueue.flush(); response.status(HttpStatus.NO_CONTENT_204); return response; }