io.openlineage.client.transports.TransportFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openlineage-java Show documentation
Show all versions of openlineage-java Show documentation
Java library for OpenLineage
/*
/* Copyright 2018-2024 contributors to the OpenLineage project
/* SPDX-License-Identifier: Apache-2.0
*/
package io.openlineage.client.transports;
import lombok.NonNull;
/**
* A factory for creating {@link Transport} instances. A {@code Transport} must define a {@link
* TransportConfig} defining the set of parameters needed to construct a new {@code Transport}
* instance. For example, {@link HttpConfig} defines the parameters for constructing a new {@link
* HttpTransport} instance when invoking {@link TransportFactory#build()}. Below, we define a list
* of supported {@code Transport}s. Note, when defining your own {@code TransportConfig}, the {@code
* type} parameter must be specified.
*
*
* - A default {@link ConsoleTransport} transport
*
- A {@link HttpTransport} transport
*
- A {@link KafkaTransport} transport
*
*/
public final class TransportFactory {
private final TransportConfig transportConfig;
public TransportFactory(@NonNull final TransportConfig transportConfig) {
this.transportConfig = transportConfig;
}
public Transport build() {
return TransportResolver.resolveTransportByConfig(transportConfig);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy