Show TOC

Interface IF_BSP_APPLICATION_EVENTSLocate this document in the navigation structure

Use

The interface IF_BSP_APPLICATION_EVENTS can be implemented by a BSP Application Class if it wants to have control over executing its own functions at specific points in the lifecycle of a BSP application. The possible time points for doing so are at the start and end of an application, and at HTTP request input and HTTP response output. Typically, these time points are used to carry out authorization checks, data persistence, and data restoration in stateless BSP applications.

Inheritance Hierarchy/Interface Composition

Enhanced Interface

-

Specializing Interfaces

-

Attributes

-

Methods
Method on_start

Signature

method on_start
  importing
    runtime  type ref to if_bsp_runtime
    request  type ref to if_http_request
    response type ref to if_http_response 
  .

                           

Description

This method is called by the BSP runtime environment when the corresponding BSP application is first started at the start of the BSP session. This applies to both stateless and stateful applications. Typically, this time point is used to carry out authorization checks that apply to the entire application, or for preliminary data retrieval (in stateful applications).

Parameter

RUNTIME

Reference to the BSP runtime

REQUEST

Reference to the current HTTP Request

RESPONSE

Reference to the current HTTP Response

Return Values/Exceptions

-

-
Method on_stop

Signature

method on_stop
  importing
    runtime  type ref to if_bsp_runtime
    request  type ref to if_http_request
    response type ref to if_http_response 
  .

                           

Description

This method is called by the BSP runtime environment when the corresponding BSP application is explicitly ended. This applies to both stateless and stateful applications.

Note

Note that this time point is not available after every request in stateless BSP applications. Moreover, the time point is not evaluated if the session is implicitly terminated by a timeout. Consequently, in this method it is only possible to execute optional operations that are not critical.

Typically, this is a good time for cleanup operations such as deleting browser cookies or server-side cookies, if the application generated them.

Parameter

RUNTIME

Reference to the BSP runtime

REQUEST

Reference to the current HTTP Request

RESPONSE

Reference to the current HTTP Response

Return Values/Exceptions

-

-
Method on_request

Signature

method on_request
  importing
    runtime  type ref to if_bsp_runtime
    request  type ref to if_http_request
    response type ref to if_http_response 
  .

                           

Description

This method is called by the BSP runtime environment for every incoming request to a BSP before the BSP is given control (in the OnRequest event handler).

This time can be used by the application class, for example, to restore attributes that were rescued in client- or server-side cookies in a previous request.

Parameter

RUNTIME

Reference to the BSP runtime

REQUEST

Reference to the current HTTP Request

RESPONSE

Reference to the current HTTP Response

Return Values/Exceptions

-

-
Method on_response

Signature

method get_parameter
  importing
    name  type string 
  returning 
    value type string
  .

                           

Description

This method is called by the BSP runtime for every outgoing response of a BSP after the BSP has been processed (after the OnManipulation event handler).

This time can be used by a stateless application class for tasks such as rescuing attributes in client-side or server-side cookies.

Parameter

RUNTIME

Reference to the BSP runtime

REQUEST

Reference to the current HTTP Request

RESPONSE

Reference to the current HTTP Response

Return Values/Exceptions

-

-