Class BoxAnnounceAsync


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

    • BoxAnnounceAsync

      public BoxAnnounceAsync()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      Announce a BoxLang event to the global system interceptor service asynchronously. By default, the event is announced to the global interception service. The return value is a BoxLang CompletableFuture that will be completed when the event has been announced. 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
       var future = announceAsync( "onRequestStart", { request = request } )
      
       // Announce to the application request
       var future = announceAsync( "myRequestEvent", { data : myData }, "request" )
       
      Overrides:
      _invoke in class BoxAnnounce
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      A CompletableFuture that will be completed when the event has been announced, or null if the state doesn't exist