Interface EventEmitterBuilder


public interface EventEmitterBuilder
Builder class for creating EventEmitter instances.

EventEmitters are identified by their scope name, version, and schema URL. These identifying fields, along with attributes, combine to form the instrumentation scope, which is attached to all events produced by the EventEmitter.

  • Method Details

    • setEventDomain

      EventEmitterBuilder setEventDomain(String eventDomain)
      Sets the event domain. Event domain is not part of EventEmitter identity.
      Parameters:
      eventDomain - The event domain, which acts as a namespace for event names. Within a particular event domain, event name defines a particular class or type of event.
      Returns:
      this
    • setSchemaUrl

      EventEmitterBuilder setSchemaUrl(String schemaUrl)
      Set the scope schema URL of the resulting EventEmitter. Schema URL is part of EventEmitter identity.
      Parameters:
      schemaUrl - The schema URL.
      Returns:
      this
    • setInstrumentationVersion

      EventEmitterBuilder setInstrumentationVersion(String instrumentationScopeVersion)
      Sets the instrumentation scope version of the resulting EventEmitter. Version is part of EventEmitter identity.
      Parameters:
      instrumentationScopeVersion - The instrumentation scope version.
      Returns:
      this
    • build

      EventEmitter build()
      Gets or creates a EventEmitter instance.
      Returns:
      a EventEmitter instance configured with the provided options.