/** * Pointcut around {@link IOperation#doOperation(java.util.Map)} * * @param pjp * @return * @throws Throwable */ //@Around("execution (* public com.nexitia.emaginplatform.core.commons.bridge.*.doOperation(..)") //public Object checkServerStatusBeforeCall(ProceedingJoinPoint pjp) throws Throwable { public Object checkServerStatusBeforeCall() throws Throwable { if (clientStatus.isDown()) { return CompletableFuture.supplyAsync(() -> { OperationMessage message = new OperationMessageBuilder() .title(bundle.getString("SERVER_DOWN_MESSAGE_TITLE")) .detail(bundle.getString("SERVER_DOWN_MESSAGE_BODY")) .build(); return new SingleResult.Builder().addMessage(message).build(); }); } // return pjp.proceed(); return null; } }