node-web-mvc
Version:
node spring mvc
24 lines (23 loc) • 878 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const AbstractMethodAdviceInterceptor_1 = __importDefault(require("./AbstractMethodAdviceInterceptor"));
class MethodAfterAdviceInterceptor extends AbstractMethodAdviceInterceptor_1.default {
invokeAsyncSupport(invocation, v) {
Promise
.resolve(v)
.then((value) => {
this.handler(invocation.getJoinPint(), value, null);
}, (error) => {
this.handler(invocation.getJoinPint(), null, error);
});
}
invoke(invocation) {
const v = invocation.proceed();
this.invokeAsyncSupport(invocation, v);
return v;
}
}
exports.default = MethodAfterAdviceInterceptor;