addInterceptor method

  1. @override
DartnessPipeline addInterceptor(
  1. DartnessInterceptor interceptor
)
override

Returns a new DartnessPipeline with dartnessInterceptor added to the existing set of DartnessInterceptor.

Implementation

@override
DartnessPipeline addInterceptor(final DartnessInterceptor interceptor) {
  final shelfInterceptor = DartnessInterceptorShelf(interceptor);
  final pipeline = _pipeline.addMiddleware(shelfInterceptor.middleware);
  return DefaultDartnessPipeline(pipeline: pipeline);
}