On this page:
manager
exn: fail: servlet-manager: no-instance
exn: fail: servlet-manager: no-continuation
Version: 4.1.5
2.13.1 General

 (require web-server/managers/manager)

"managers/manager.ss" defines the manager interface. It is required by the users and implementers of managers.

(struct manager (create-instance
    adjust-timeout!
    clear-continuations!
    continuation-store!
    continuation-lookup))
  create-instance : ((-> void) . -> . number?)
  adjust-timeout! : (number? number? . -> . void)
  clear-continuations! : (number? . -> . void)
  continuation-store! : (number? any/c expiration-handler/c . -> . (list/c number? number?))
  continuation-lookup : (number? number? number? . -> . any/c)

create-instance is called to initialize a instance, to hold the continuations of one servlet session. It is passed a function to call when the instance is expired. It runs the id of the instance.

adjust-timeout! is a to-be-deprecated function that takes an instance-id and a number. It is specific to the timeout-based manager and will be removed.

clear-continuations! expires all the continuations of an instance.

continuation-store! is given an instance-id, a continuation value, and a function to include in the exception thrown if the continuation is looked up and has been expired. The two numbers returned are a continuation-id and a nonce.

continuation-lookup finds the continuation value associated with the instance-id, continuation-id, and nonce triple it is given.

(struct (exn:fail:servlet-manager:no-instance exn:fail) (expiration-handler
  expiration-handler : expiration-handler/c

This exception should be thrown by a manager when an instance is looked up that does not exist.

(struct (exn:fail:servlet-manager:no-continuation exn:fail) (expiration-handler
  expiration-handler : expiration-handler/c

This exception should be thrown by a manager when a continuation is looked up that does not exist.