Show TOC

Background documentationInterface IF_BSP_APPLICATION_EVENTS Locate this document in the navigation structure

 

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 application start and end, and at HTTP Request Input and HTTP Response Output. Typically, these time points are used to carry out authorization checks, data persisting, or data restoration in stateless BSP applications.

Inheritance Hierarchy/Interface Composition
Enhanced Interface

-

Specializing Interfaces

-

Attributes

-

Methods
Method on_start

Signature

Syntax Syntax

  1. 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 
      .
    
End of the code.

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).

Parameters

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

Syntax Syntax

  1. 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 
      .
    
End of the code.

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

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.

End of the note.

Parameters

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

Syntax Syntax

  1. 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 
      .
    
End of the code.

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.

Parameters

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

Syntax Syntax

  1. method get_parameter
      importing
        name  type string 
      returning 
        value type string
      .
    
End of the code.

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.

Parameters

RUNTIME

Reference to the BSP runtime

REQUEST

Reference to the current HTTP Request

RESPONSE

Reference to the current HTTP Response

Return Values/Exceptions

-