@Immutable @ParametersAreNonnullByDefault public final class EventUtilitiesConfig extends Object implements Serializable
create*()
methods expect the client to manage wiring by taking
the collaborators of the class created as method arguments. This allows
the caller to decide on sharing instances or not. And it allows this class
to stay lightweight and without any mutable state.Modifier and Type | Class and Description |
---|---|
static class |
EventUtilitiesConfig.EventUtilitiesConfigBuilder |
Modifier and Type | Field and Description |
---|---|
static EventUtilitiesConfig |
DEFAULT
Default values and instances to aide working with Event Streams in
Wikimedia Production.
|
static EventUtilitiesConfig |
EXTERNAL_DEFAULT
Default values and instances to aide working with Event Streams in
Wikimedia outside of production networks, e.g.
|
static String |
META_WIKIMEDIA_ORG |
public static final String META_WIKIMEDIA_ORG
public static final EventUtilitiesConfig DEFAULT
public static final EventUtilitiesConfig EXTERNAL_DEFAULT
public BasicHttpClient createHttpClient()
public EventLoggingSchemaLoader createEventloggingSchemaLoader(BasicHttpClient httpClient)
public MediawikiEventStreamConfigLoader createMediawikiEventStreamConfigLoader(BasicHttpClient httpClient)
public EventStreamConfig createEventStreamConfig(EventStreamConfigLoader eventStreamConfigLoader)
public EventSchemaLoader createEventSchemaLoader(BasicHttpClient httpClient)
public EventStreamFactory createEventStreamFactory(EventSchemaLoader eventSchemaLoader, EventStreamConfig eventStreamConfig)
public EventSchemaValidator createEventSchemaValidator(EventSchemaLoader eventSchemaLoader)
public JsonEventGenerator createJsonEventGenerator(EventSchemaLoader eventSchemaLoader, EventStreamConfig eventStreamConfig)
public static EventUtilitiesConfig.EventUtilitiesConfigBuilder builder()
@Nonnull public String getEventloggingSchemaBaseUri()
@Nonnull public Map<String,URI> getEventServiceToUriMap()
@Nullable public String getEventStreamConfigEndpoint()
@Nonnull public String getEventStreamConfigUri()
@Nonnull public SerializableClock getClock()
EventUtilitiesConfig config = EventUtilitiesConfig.DEFAULT.withClock(SerializableClock.frozenClock(Instant.EPOCH));
public EventUtilitiesConfig withClock(@Nonnull SerializableClock clock)
EventUtilitiesConfig config = EventUtilitiesConfig.DEFAULT.withClock(SerializableClock.frozenClock(Instant.EPOCH));
this
if an identical value is passed).Copyright © 2025. All rights reserved.