Application Events

These events occur within the lifecycle of BoxLang applications, including sessions and requests.

These events are also special, because not only are they announced by the BoxLang runtime globally, but also by the Application.bx Listener locally on a per-request basis. This means, that you or modules can listen to application life-cycle events on a per request basis without affecting other applications.

Event Name
Data
Description

onApplicationStart

Triggered when an application starts.

onApplicationEnd

Triggered when an application ends.

onApplicationRestart

Triggered when an application restarts.

onApplicationDefined

Triggered when an application is defined.

beforeApplicationListenerLoad

Before application listener is loaded.

afterApplicationListenerLoad

After application listener is loaded.

onRequestFlushBuffer

Triggered when the output buffer is flushed.

onSessionCreated

Triggered when a session is created.

onSessionDestroyed

Triggered when a session is destroyed.

onRequest

Generic request event.

onRequestStart

Triggered at the start of a request.

onRequestEnd

Triggered at the end of a request.

onClassRequest

Triggered when a class is requested.

onSessionStart

Triggered at the start of a session.

onSessionEnd

Triggered at the end of a session.

onError

Triggered when an error occurs.

onMissingTemplate

Triggered when a template is not found.

onAbort

Triggered when a request is aborted.

Last updated

Was this helpful?