public final Object invokeNextThenApply(InvocationContext ctx, VisitableCommand command,
                                           InvocationSuccessFunction function) {
      try {
         Object rv;
         if (nextDDInterceptor != null) {
            rv = command.acceptVisitor(ctx, nextDDInterceptor);
         } else {
            rv = nextInterceptor.visitCommand(ctx, command);
         }
         if (rv instanceof InvocationStage) {
            return ((InvocationStage) rv).thenApply(ctx, command, function);
         }
         return function.apply(ctx, command, rv);
      } catch (Throwable throwable) {
         return new SimpleAsyncInvocationStage(throwable);
      }
   }
public final Object invokeNextThenApply ( InvocationContext ctx , VisitableCommand command , InvocationSuccessFunction function ) { try { Object rv ; if ( nextDDInterceptor != null ) { rv = command . acceptVisitor ( ctx , nextDDInterceptor ) ; } else { rv = nextInterceptor . visitCommand ( ctx , command ) ; } if ( rv instanceof InvocationStage ) { return ( ( InvocationStage ) rv ) . thenApply ( ctx , command , function ) ; } return function . apply ( ctx , command , rv ) ; } catch ( Throwable throwable ) { return new SimpleAsyncInvocationStage ( throwable ) ; } }
Invoke the next interceptor, possibly with a new command, and execute an {@link InvocationCallback}
after all the interceptors have finished successfully.

<p>You need to wrap the result with {@link #makeStage(Object)} if you need to add another handler.</p>