Class BoxAnnounce

java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.system.BoxAnnounce
Direct Known Subclasses:
BoxAnnounceAsync

@BoxBIF(description="Announce an event synchronously") public class BoxAnnounce extends BIF
  • Constructor Details

    • BoxAnnounce

      public BoxAnnounce()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      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" )
       
      Specified by:
      _invoke in class BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      The result of the invocation
    • getTargetPool

      protected InterceptorPool getTargetPool(String poolName, IBoxContext context)
      Get the target interceptor pool based on the pool name.
      Parameters:
      poolName - The name of the pool to get.
      context - The context in which the BIF is being invoked.
      Returns:
      The target interceptor pool.