Class EventEmitter


  • public class EventEmitter
    extends Object
    Fire some events while booting or executing. This allows some extension Loads implementations of EventingService with Java ServiceLoader. The order in which EventingServices are invoked can be controlled by annotating the class implementing EventingService with javax.annotation.Priority. See also io.smallrye.graphql.execution.event.Priorities containing relevant constants. When before* events happen EventingServices are invoked by ascending @{code @Priority}, and for after* events invocations are done by descending @{code @Priority}. Meaning that an EventingService with low javax.annotation.Priority is executed first on the way in, and last on the way out.
    Author:
    Phillip Kruger ([email protected])
    • Method Detail

      • fireBeforeExecute

        public void fireBeforeExecute​(Context context)
      • fireOnExecuteError

        public void fireOnExecuteError​(Context context,
                                       Throwable t)
      • fireAfterExecute

        public void fireAfterExecute​(Context context)
      • fireBeforeDataFetch

        public void fireBeforeDataFetch​(Context context)
      • fireOnDataFetchError

        public void fireOnDataFetchError​(Context context,
                                         Throwable t)
      • fireAfterDataFetch

        public void fireAfterDataFetch​(Context context)
      • fireBeforeGraphQLBuild

        public graphql.GraphQL.Builder fireBeforeGraphQLBuild​(graphql.GraphQL.Builder builder)
        This gets fired just before we build the GraphQL object
        Parameters:
        builder - as it stands
        Returns:
        builder modified by listener
      • fireBeforeSchemaBuild

        public graphql.schema.GraphQLSchema.Builder fireBeforeSchemaBuild​(graphql.schema.GraphQLSchema.Builder builder)
        This gets fired just before we create the final schema. This allows listeners to add to the builder any custom elements.
        Parameters:
        builder - as it stands
        Returns:
        builder modified by listener
      • fireCreateOperation

        public Operation fireCreateOperation​(Operation operation)
        This gets fired during the bootstrap phase before a new operation is being created. This allows listeners to modify the operation
        Parameters:
        operation - as it stands
        Returns:
        operation possibly modified
      • fireOverrideJsonbConfig

        public Map<String,​jakarta.json.bind.Jsonb> fireOverrideJsonbConfig()