
com.github.jcustenborder.kafka.connect.client.AsyncKafkaConnectClient Maven / Gradle / Ivy
The newest version!
/**
* Copyright © 2019 Jeremy Custenborder ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.github.jcustenborder.kafka.connect.client;
import com.github.jcustenborder.kafka.connect.client.model.ConnectorInfo;
import com.github.jcustenborder.kafka.connect.client.model.ConnectorPlugin;
import com.github.jcustenborder.kafka.connect.client.model.ConnectorStatus;
import com.github.jcustenborder.kafka.connect.client.model.CreateConnectorRequest;
import com.github.jcustenborder.kafka.connect.client.model.CreateConnectorResponse;
import com.github.jcustenborder.kafka.connect.client.model.ServerInfo;
import com.github.jcustenborder.kafka.connect.client.model.TaskConfig;
import com.github.jcustenborder.kafka.connect.client.model.TaskStatus;
import com.github.jcustenborder.kafka.connect.client.model.ValidateResponse;
import org.immutables.value.Value;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
public interface AsyncKafkaConnectClient extends AutoCloseable {
/**
* Method is used to list the connectors.
*
* @return list of connector names.
*/
CompletableFuture> connectorsAsync();
default CompletableFuture createConnectorAsync(String name, Map config) {
return createConnectorAsync(
CreateConnectorRequest.builder()
.name(name)
.putAllConfig(config)
.build()
);
}
CompletableFuture createConnectorAsync(CreateConnectorRequest request);
/**
* Method is used to create a connector.
*
* @param name name of the connector.
* @param config config for the connector.
* @return Information about the created or updated connector.
*/
CompletableFuture createOrUpdateAsync(String name, Map config);
/**
* Method is used to return information about the connector.
*
* @param name name of the connector.
* @return Information about the requested connector.
*/
CompletableFuture infoAsync(String name);
/**
* Method is used to retrieve the configuration for a connector.
*
* @param name name of the connector.
* @return map of the configuration.
*/
CompletableFuture
© 2015 - 2025 Weber Informatics LLC | Privacy Policy