► |  | Web Server: PLT HTTP Server

1 | Running the Web Server
2 | Writing Servlets
3 | Extending the Web Server
4 | Troubleshooting and Tips
5 | Acknowledgements
| Index

► | 2 | Writing Servlets

2.1 | Defining a Servlet
2.2 | APIs
2.3 | Common Contracts
2.4 | HTTP
2.5 | Web Interaction
2.6 | Stateless Web Interaction
2.7 | Web Cells
2.8 | File Boxes
2.9 | Stateless Web Parameters
2.10 | Formlets
2.11 | Templates
2.12 | Continuation Managers

▼ | 2.12 | Continuation Managers

2.12.1 | General
2.12.2 | No Continuations
2.12.3 | Timeouts
2.12.4 | LRU

On this page:

manager
exn: fail: servlet-manager: no-instance
exn: fail: servlet-manager: no-continuation

Version: 4.1.4
top← prev up next →

##### 2.12.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.

top← prev up next →