io.edurt.datacap.plugin.http.cratedb.CrateDBAdapter Maven / Gradle / Ivy
package io.edurt.datacap.plugin.http.cratedb;
import io.edurt.datacap.spi.adapter.HttpAdapter;
import io.edurt.datacap.spi.connection.HttpConfigure;
import io.edurt.datacap.spi.connection.HttpConnection;
import io.edurt.datacap.spi.connection.http.HttpClient;
import io.edurt.datacap.spi.connection.http.HttpMethod;
import io.edurt.datacap.spi.json.JSON;
import io.edurt.datacap.spi.model.Response;
import io.edurt.datacap.spi.model.Time;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.lang3.ObjectUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Slf4j
public class CrateDBAdapter
extends HttpAdapter
{
public CrateDBAdapter(HttpConnection httpConnection)
{
super(httpConnection);
}
@Override
public Response handlerExecute(String content)
{
Time processorTime = new Time();
processorTime.setStart(new Date().getTime());
Response response = this.connection.getResponse();
HttpConfigure httpConfigure = new HttpConfigure();
if (response.getIsConnected()) {
List headers = new ArrayList<>();
List types = new ArrayList<>();
List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy