Class VastEventProcessor

  • All Implemented Interfaces:

    
    public final class VastEventProcessor
    
                        

    Event processor for handling VAST-related telemetry and beacon events.

    This class manages the processing and submission of VAST parsing events, telemetry reporting, and error beacon firing throughout the VAST processing pipeline. It serves as the central coordinator for all event-related activities during VAST XML parsing, validation, and error handling.

    The processor handles two main categories of events:

    • Telemetry events for internal monitoring and analytics

    • Beacon events for external tracking and error reporting

    • Constructor Detail

      • VastEventProcessor

        VastEventProcessor(AdContext adContext)
        Parameters:
        adContext - The AdContext providing configuration and metadata for event processing
    • Method Detail

      • submitVastParseStart

         final Unit submitVastParseStart()

        Submits a telemetry event indicating the start of VAST parsing.

        This method should be called when VAST XML parsing begins to track the start of the parsing process for performance monitoring and analytics.

      • submitVastParseSuccess

         final Unit submitVastParseSuccess()

        Submits a telemetry event indicating successful completion of VAST parsing.

        This method should be called when VAST XML parsing completes successfully to track parsing success rates and performance metrics.

      • submitVastParseEvent

         final Unit submitVastParseEvent(Short eventCode)

        Submits a telemetry event with a specific VAST parse event code.

        This method is used to report specific events or conditions that occur during VAST parsing that may not be failures but are worth tracking for analytics and debugging purposes.

        Parameters:
        eventCode - The VastParseErrorCode indicating the specific event type
      • submitVastParseFailureEvent

         final Unit submitVastParseFailureEvent(Short errorCode)

        Submits a telemetry event indicating VAST parsing failure.

        This method should be called when VAST XML parsing fails to track failure rates, error patterns, and specific error conditions for debugging and quality monitoring.

        Parameters:
        errorCode - The VastParseErrorCode indicating the specific failure reason
      • fireVastErrorBeacons

         final Unit fireVastErrorBeacons(Map<String, String> macros, List<NativeTracker> nativeTrackers, InMobiLogger logger)

        Fires VAST error beacon URLs from native trackers.

        This method processes a list of NativeTracker instances, filters for error tracking URLs, performs macro substitution, and fires the resulting beacon URLs to report errors to ad servers and monitoring systems.

        Parameters:
        macros - Map of macro keys to replacement values for URL template processing
        nativeTrackers - List of NativeTracker instances containing potential error beacons
        logger - Optional InMobiLogger for logging beacon firing operations
      • fireErrorBeacons

         final Unit fireErrorBeacons(Map<String, String> macros, List<String> urls, InMobiLogger logger)

        Fires error beacon URLs from a direct list of tracking URLs.

        This method processes a list of error tracking URLs, performs macro substitution, and fires the resulting beacon URLs. This is used when error tracking URLs are provided directly rather than through NativeTracker instances.

        Parameters:
        macros - Map of macro keys to replacement values for URL template processing
        urls - List of error tracking URLs to fire
        logger - Optional InMobiLogger for logging beacon firing operations