While you're working with an Araneida system, sometimes you find yourself wondering "what handlers do I have, and where are they attached?". Well, I find myself wondering that on a regular basis.
So I wrote SHOW-HANDLER-HIERARCHY and SHOW-LISTENER-HANDLERS.
Given a handler, SHOW-HANDLER-HIERARCHY will print out what handlers are below it. If a handler is an inexact matcher, an asterisk will be appended to the end of its name.
Given a listener, SHOW-LISTENER-HANDLERS will do the same as above.
In addition, if you are working with session variables, you may find SHOW-SESSIONS useful. It will print a description of all the current sessions.
If you wish to declaratively define the handlers for URLs in Araneida (and you don't mind them all being inexact matchers), ATTACH-HIERARCHY is the macro for you.
The documentation is contained in convenience.lisp. It's quite easy, once you get used to it.
here is a small example, though:
(attach-hierarchy (http-listener-handler *listener*) (parse-urlstring "http://example.com/") (parse-urlstring "http://example.com/") ("/puppies-and-kittens" puppy-and-kitten-handler) ("/lizards-and-fish" lizard-and-fish-simulator) ("/orderform" order-form-dispatching-handler ("/order-a-whole-bunch-of-croppy" das-megacroppy-handler) ("/order-a-cute-kitten" kitten-feed-handler)))
Documentation is through the docstring, so you can also view it via:
(documentation 'araneida:attach-hierarchy 'function)