Start of Content Area

Object documentation Constants for Describing Lifetime Control  Locate the document in its SAP Library structure

Definition

As described in section IF_HTTP_EXTENSION, HTTP request handlers can control the lifetime of their instances if they are operating in stateful mode. When requests are being processed in stateless mode, the lifetime of any HTTP request handler instance is of course restricted  to a single request, and ends at the same time as the lifetime of the user context (that is, it ends when HANDLE_REQUEST() is returned).

Use

If the attribute IF_HTTP_EXTENSION~LIFETIME_RC is set to one of the following values, the HTTP request handler can specify whether the handler should be reinitiated for every request in a session, or whether the handler should be retained and reused for subsequent HTTP requests.

Structure

Name of Constant

Meaning

This instance of the HTTP request handler is to be retained and reused for subsequent requests in the same session. This means that data in instance attributes of the implementation class are retained for several requests, and can be used for local caching and optimization, or status handling. This is the default for all HTTP request handlers.

The current instance of the HTTP request handler is terminated after the request is processed. If stateful mode is active, a new instance of the HTTP request handler is created. This means that local data belonging to the instance is lost.

 

 

End of Content Area