Common Lisp Package: CLACK.MIDDLEWARE

# Clack.Middleware - Base Class for Clack Middleware. ## SYNOPSIS (in-package :cl-user) (defpackage clack.middleware.example (:use :cl :clack) (:export :<clack-middleware-example>)) (in-package :clack.middleware.example) (defclass <clack-middleware-example> (<middleware>) ()) (defmethod call ((this <clack-middleware-example>) env) ;; pre-processing `env' (let ((res (call-next this env))) ;; post-processing `res' res)) ## DESCRIPTION Clack.Middleware is the base class to write Clack Middleware. All you have to do is to inherit from `<middleware>' and then implement the callback `call' method to do the actual work. Middleware is similar to ':around' method of CLOS. You can delegate some processes to Application (or next Middleware) to call `call-next'. ## AUTHOR Author: Eitarow Fukamachi (e.arrows@gmail.com) ## SEE ALSO * Clack.Component

README:

GENERIC-FUNCTION

Public

Undocumented

CALL-NEXT (THIS ENV)

WRAP (THIS APP-OR-MIDDLEWARE)

Private

CALL (COMP ENV)

Invoke component. Designed to be overriden in subclasses.

SLOT-ACCESSOR

Private

Undocumented

APP (OBJECT)

CLASS

Public

<MIDDLEWARE>

Class for Clack Middleware.

Private

<COMPONENT>

Base Class for Clack Component shared between <middleware> and Clack Application.