Liking cljdoc? Tell your friends :D

Chain Providers

Pedestal uses a chain of interceptors.adoc to process incoming HTTP requests and provide outgoing HTTP responses. However, the underlying code - the interceptors and the interceptor chain that executes them - is more general.

Interceptor chains can be used for a variety of operations, such as:

  • Processing messages from a queue, such as Kafka or JMS

  • Performing a series of transformations on documents as part of a publishing service

  • Processing outgoing requests and incoming responses from a back-end service

A chain provider is responsible for accepting an incoming stimuli (such as an incoming HTTP request) and setting up a context-map.adoc and initial interceptors to process that stimuli. The service map is processed via the api:execute[ns=io.pedestal.interceptor.chain] function.

Part of a chain provider’s responsibility is to identify when a request has been processed; for HTTP requests, this is when a handler or some other interceptor attaches a :response map to the context map.

Pedestal itself only provides a chain provider implementation for incoming HTTP request processing, in the form of the servlet-interceptor.adoc.

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close