Interface PubContent

  • All Implemented Interfaces:

    
    public interface PubContent
    
                        

    Interface for parsing and validating publisher ad content.

    This interface defines the contract for handling ad content received from the publisher. Implementations handle different content types (HTML, JSON, etc.) and provide parsing, validation, and content retrieval functionality. The interface supports both synchronous and asynchronous parsing operations.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit parseContent() Parses the ad content asynchronously.
      abstract Unit validateOrThrow() Validates the parsed content and throws an exception if validation fails.
      abstract Object getContent() Retrieves the parsed and validated ad content.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • parseContent

         Unit parseContent()

        Parses the ad content asynchronously.

        This method performs the actual parsing of the raw ad content into a structured format. The parsing is asynchronous to handle potentially expensive operations without blocking the calling thread.

      • validateOrThrow

         abstract Unit validateOrThrow()

        Validates the parsed content and throws an exception if validation fails.

        This method performs validation checks on the parsed content to ensure it meets the required format and contains necessary elements for proper ad rendering.

      • getContent

         abstract Object getContent()

        Retrieves the parsed and validated ad content.

        This method returns the final processed content that can be used for ad rendering. The content type varies based on the implementation and content format.

        Returns:

        The parsed ad content object, or null if no content is available.