BoxAnnounce
Announce a BoxLang event to a specific interceptor pool.
By default, the event is announced to the global interception service. Available pools are "global" and "request". The request pool is tied to the application listener and is only available during the request lifecycle.
Example:
// Announce globally
boxAnnounce( "onRequestStart", { request = request } )
// Announce to the application request
boxAnnounce( "myRequestEvent", { data : myData }, "request" )
Method Signature
BoxAnnounce(state=[string], data=[struct], poolname=[string])
Arguments
Argument
Type
Required
Description
Default
state
string
true
The interceptor event to announce: Ex: "onRequestStart", "onRequestEnd", "onError"
data
struct
false
The data struct to send with the event
{}
poolname
string
false
The name of the interceptor pool to announce the event to. Default is "global". Available pools are "global" and "request".
global
Examples
Related
Last updated
Was this helpful?