basicInterceptor.js 346 B

1234567891011121314151617181920212223
  1. /**
  2. * Basic Interceptor class
  3. */
  4. class BasicInterceptor {
  5. isInterceptWhen(contextName) {
  6. // implement this
  7. return false;
  8. }
  9. isProcessableParallel() {
  10. // implement this
  11. return true;
  12. }
  13. process(contextName, ...args) {
  14. // override this
  15. return Promise.resolve(...args);
  16. }
  17. }
  18. module.exports = BasicInterceptor;