All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.openlineage.client.transports.TransportFactory Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
/*
/* Copyright 2018-2023 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