diff --git a/examples/simple-consumer/src/main/java/rs/iggy/SimpleConsumer.java b/examples/simple-consumer/src/main/java/rs/iggy/SimpleConsumer.java index f5499ef..64ea781 100644 --- a/examples/simple-consumer/src/main/java/rs/iggy/SimpleConsumer.java +++ b/examples/simple-consumer/src/main/java/rs/iggy/SimpleConsumer.java @@ -2,6 +2,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.tcp.IggyTcpClient; import rs.iggy.consumergroup.Consumer; import rs.iggy.consumergroup.ConsumerGroupDetails; @@ -9,14 +10,12 @@ import rs.iggy.identifier.StreamId; import rs.iggy.identifier.TopicId; import rs.iggy.message.PolledMessage; -import rs.iggy.message.PolledMessages; import rs.iggy.message.PollingStrategy; import rs.iggy.stream.StreamDetails; import rs.iggy.topic.CompressionAlgorithm; import rs.iggy.topic.TopicDetails; import java.math.BigInteger; import java.util.ArrayList; -import java.util.List; import java.util.Optional; import static java.util.Optional.empty; @@ -31,7 +30,7 @@ public class SimpleConsumer { private static final Logger log = LoggerFactory.getLogger(SimpleConsumer.class); public static void main(String[] args) { - IggyTcpClient client = new IggyTcpClient("localhost", 8090); + var client = new IggyTcpClient("localhost", 8090); client.users().login("iggy", "iggy"); createStream(client); @@ -39,9 +38,9 @@ public static void main(String[] args) { createConsumerGroup(client); client.consumerGroups().joinConsumerGroup(STREAM_ID, TOPIC_ID, GROUP_ID); - List messages = new ArrayList<>(); + var messages = new ArrayList(); while (messages.size() < 1000) { - PolledMessages polledMessages = client.messages() + var polledMessages = client.messages() .pollMessages(STREAM_ID, TOPIC_ID, empty(), @@ -57,7 +56,7 @@ public static void main(String[] args) { } } - private static void createStream(IggyTcpClient client) { + private static void createStream(IggyBaseClient client) { Optional stream = client.streams().getStream(STREAM_ID); if (stream.isPresent()) { return; @@ -65,7 +64,7 @@ private static void createStream(IggyTcpClient client) { client.streams().createStream(empty(), STREAM_NAME); } - private static void createTopic(IggyTcpClient client) { + private static void createTopic(IggyBaseClient client) { Optional topic = client.topics().getTopic(STREAM_ID, TOPIC_ID); if (topic.isPresent()) { return; @@ -82,7 +81,7 @@ private static void createTopic(IggyTcpClient client) { } - private static void createConsumerGroup(IggyTcpClient client) { + private static void createConsumerGroup(IggyBaseClient client) { Optional consumerGroup = client.consumerGroups() .getConsumerGroup(STREAM_ID, TOPIC_ID, GROUP_ID); if (consumerGroup.isPresent()) { diff --git a/examples/simple-producer/src/main/java/rs/iggy/SimpleProducer.java b/examples/simple-producer/src/main/java/rs/iggy/SimpleProducer.java index a0934dd..806b08b 100644 --- a/examples/simple-producer/src/main/java/rs/iggy/SimpleProducer.java +++ b/examples/simple-producer/src/main/java/rs/iggy/SimpleProducer.java @@ -23,7 +23,7 @@ public class SimpleProducer { private static final Logger log = LoggerFactory.getLogger(SimpleProducer.class); public static void main(String[] args) { - IggyTcpClient client = new IggyTcpClient("localhost", 8090); + var client = new IggyTcpClient("localhost", 8090); client.users().login("iggy", "iggy"); createStream(client); diff --git a/java-sdk/src/main/java/rs/iggy/Iggy.java b/java-sdk/src/main/java/rs/iggy/Iggy.java index 910a873..84d10bf 100644 --- a/java-sdk/src/main/java/rs/iggy/Iggy.java +++ b/java-sdk/src/main/java/rs/iggy/Iggy.java @@ -1,4 +1,14 @@ package rs.iggy; -public class Iggy { +import rs.iggy.clients.blocking.IggyClientBuilder; + +public final class Iggy { + + private Iggy() { + } + + public static IggyClientBuilder clientBuilder() { + return new IggyClientBuilder(); + } + } diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyBaseClient.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyBaseClient.java new file mode 100644 index 0000000..3467cfd --- /dev/null +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyBaseClient.java @@ -0,0 +1,23 @@ +package rs.iggy.clients.blocking; + +public interface IggyBaseClient { + + SystemClient system(); + + StreamsClient streams(); + + UsersClient users(); + + TopicsClient topics(); + + PartitionsClient partitions(); + + ConsumerGroupsClient consumerGroups(); + + ConsumerOffsetsClient consumerOffsets(); + + MessagesClient messages(); + + PersonalAccessTokensClient personalAccessTokens(); + +} diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClient.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClient.java index e1ea4c2..37c5872 100644 --- a/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClient.java +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClient.java @@ -1,23 +1,15 @@ package rs.iggy.clients.blocking; -public interface IggyClient { +public class IggyClient { - SystemClient system(); + private final IggyBaseClient baseClient; - StreamsClient streams(); + public IggyClient(IggyBaseClient baseClient) { + this.baseClient = baseClient; + } - UsersClient users(); - - TopicsClient topics(); - - PartitionsClient partitions(); - - ConsumerGroupsClient consumerGroups(); - - ConsumerOffsetsClient consumerOffsets(); - - MessagesClient messages(); - - PersonalAccessTokensClient personalAccessTokens(); + public IggyBaseClient getBaseClient() { + return baseClient; + } } diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClientBuilder.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClientBuilder.java new file mode 100644 index 0000000..247d363 --- /dev/null +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/IggyClientBuilder.java @@ -0,0 +1,19 @@ +package rs.iggy.clients.blocking; + +public class IggyClientBuilder { + + private IggyBaseClient client; + + public IggyClientBuilder withBaseClient(IggyBaseClient client) { + this.client = client; + return this; + } + + public IggyClient build() { + if (client == null) { + throw new IllegalArgumentException("Base client not provided"); + } + return new IggyClient(client); + } + +} diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/http/IggyHttpClient.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/http/IggyHttpClient.java index 48fcca1..be95757 100644 --- a/java-sdk/src/main/java/rs/iggy/clients/blocking/http/IggyHttpClient.java +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/http/IggyHttpClient.java @@ -2,7 +2,7 @@ import rs.iggy.clients.blocking.*; -public class IggyHttpClient implements IggyClient { +public class IggyHttpClient implements IggyBaseClient { private final SystemHttpClient systemClient; private final StreamsHttpClient streamsClient; diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/IggyTcpClient.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/IggyTcpClient.java index c6a05b9..dd9cace 100644 --- a/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/IggyTcpClient.java +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/IggyTcpClient.java @@ -2,7 +2,7 @@ import rs.iggy.clients.blocking.*; -public class IggyTcpClient implements IggyClient { +public class IggyTcpClient implements IggyBaseClient { private final UsersTcpClient usersClient; private final StreamsTcpClient streamsClient; @@ -16,6 +16,7 @@ public class IggyTcpClient implements IggyClient { public IggyTcpClient(String host, Integer port) { InternalTcpClient tcpClient = new InternalTcpClient(host, port); + tcpClient.connect(); usersClient = new UsersTcpClient(tcpClient); streamsClient = new StreamsTcpClient(tcpClient); topicsClient = new TopicsTcpClient(tcpClient); diff --git a/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/InternalTcpClient.java b/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/InternalTcpClient.java index 376ff0f..ce595f4 100644 --- a/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/InternalTcpClient.java +++ b/java-sdk/src/main/java/rs/iggy/clients/blocking/tcp/InternalTcpClient.java @@ -17,15 +17,19 @@ final class InternalTcpClient { private static final int COMMAND_LENGTH = 4; private static final int RESPONSE_INITIAL_BYTES_LENGTH = 8; - private final Connection connection; + private final TcpClient client; private final BlockingQueue responses = new LinkedBlockingQueue<>(); + private Connection connection; InternalTcpClient(String host, Integer port) { - this.connection = TcpClient.create() + client = TcpClient.create() .host(host) .port(port) - .doOnConnected(conn -> conn.addHandlerLast(new IggyResponseDecoder())) - .connectNow(); + .doOnConnected(conn -> conn.addHandlerLast(new IggyResponseDecoder())); + } + + void connect() { + this.connection = client.connectNow(); this.connection.inbound().receiveObject().ofType(IggyResponse.class).subscribe(responses::add); } diff --git a/java-sdk/src/test/java/rs/iggy/IggyTest.java b/java-sdk/src/test/java/rs/iggy/IggyTest.java new file mode 100644 index 0000000..dd19790 --- /dev/null +++ b/java-sdk/src/test/java/rs/iggy/IggyTest.java @@ -0,0 +1,20 @@ +package rs.iggy; + +import org.junit.jupiter.api.Test; +import rs.iggy.clients.blocking.http.IggyHttpClient; +import static org.assertj.core.api.Assertions.assertThat; + +class IggyTest { + + @Test + void test() { + var baseClient = new IggyHttpClient("http://localhost:8080"); + + var client = Iggy.clientBuilder() + .withBaseClient(baseClient) + .build(); + + assertThat(client).isNotNull(); + } + +} diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/IntegrationTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/IntegrationTest.java index 232a8a7..bbad5e7 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/IntegrationTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/IntegrationTest.java @@ -20,14 +20,14 @@ public abstract class IntegrationTest { protected final GenericContainer iggyServer = new GenericContainer<>(DockerImageName.parse("iggyrs/iggy:latest")) .withExposedPorts(HTTP_PORT, TCP_PORT); - protected IggyClient client; + protected IggyBaseClient client; @BeforeEach void beforeEachIntegrationTest() { client = getClient(); } - abstract protected IggyClient getClient(); + abstract protected IggyBaseClient getClient(); protected void setUpStream() { client.streams().createStream(of(42L), "test-stream"); diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerGroupsHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerGroupsHttpClientTest.java index 4bf4266..c7b0ba5 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerGroupsHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerGroupsHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; import rs.iggy.clients.blocking.ConsumerGroupsClientBaseTest; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; class ConsumerGroupsHttpClientTest extends ConsumerGroupsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerOffsetsHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerOffsetsHttpClientTest.java index 04233de..8c6371a 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerOffsetsHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/ConsumerOffsetsHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; import rs.iggy.clients.blocking.ConsumerOffsetsClientBaseTest; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; class ConsumerOffsetsHttpClientTest extends ConsumerOffsetsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/MessagesHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/MessagesHttpClientTest.java index 1019074..99d7f97 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/MessagesHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/MessagesHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.MessagesClientBaseTest; class MessagesHttpClientTest extends MessagesClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PartitionsHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PartitionsHttpClientTest.java index cb4343f..8601f15 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PartitionsHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PartitionsHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.PartitionsClientBaseTest; class PartitionsHttpClientTest extends PartitionsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PersonalAccessTokensHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PersonalAccessTokensHttpClientTest.java index b89c9be..3159fee 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PersonalAccessTokensHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/PersonalAccessTokensHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.PersonalAccessTokensBaseTest; class PersonalAccessTokensHttpClientTest extends PersonalAccessTokensBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/StreamHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/StreamHttpClientTest.java index 0881011..4f9560a 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/StreamHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/StreamHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.StreamClientBaseTest; class StreamHttpClientTest extends StreamClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/SystemHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/SystemHttpClientTest.java index ee38c1e..b0b29f3 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/SystemHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/SystemHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.SystemClientBaseTest; class SystemHttpClientTest extends SystemClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/TopicsHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/TopicsHttpClientTest.java index a9919ce..9261122 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/TopicsHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/TopicsHttpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.http; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.TopicsClientBaseTest; class TopicsHttpClientTest extends TopicsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/UsersHttpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/UsersHttpClientTest.java index 5819785..f51abe4 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/http/UsersHttpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/http/UsersHttpClientTest.java @@ -1,14 +1,14 @@ package rs.iggy.clients.blocking.http; import org.junit.jupiter.api.Test; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.UsersClientBaseTest; import static org.assertj.core.api.Assertions.assertThat; class UsersHttpClientTest extends UsersClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return HttpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerGroupsTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerGroupsTcpClientTest.java index 04c5251..9439feb 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerGroupsTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerGroupsTcpClientTest.java @@ -2,14 +2,14 @@ import org.junit.jupiter.api.Test; import rs.iggy.clients.blocking.ConsumerGroupsClientBaseTest; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import java.util.Optional; import static org.assertj.core.api.Assertions.assertThat; class ConsumerGroupsTcpClientTest extends ConsumerGroupsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerOffsetsTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerOffsetsTcpClientTest.java index 06c72b0..1996b54 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerOffsetsTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/ConsumerOffsetsTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; import rs.iggy.clients.blocking.ConsumerOffsetsClientBaseTest; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; class ConsumerOffsetsTcpClientTest extends ConsumerOffsetsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/MessagesTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/MessagesTcpClientTest.java index d338e6b..8b9377d 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/MessagesTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/MessagesTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.MessagesClientBaseTest; class MessagesTcpClientTest extends MessagesClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PartitionsTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PartitionsTcpClientTest.java index 1342b9a..b6c5d69 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PartitionsTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PartitionsTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.PartitionsClientBaseTest; class PartitionsTcpClientTest extends PartitionsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PersonalAccessTokensTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PersonalAccessTokensTcpClientTest.java index 4bce838..36fbce4 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PersonalAccessTokensTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/PersonalAccessTokensTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.PersonalAccessTokensBaseTest; class PersonalAccessTokensTcpClientTest extends PersonalAccessTokensBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/StreamTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/StreamTcpClientTest.java index 48ba856..45c0117 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/StreamTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/StreamTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.StreamClientBaseTest; class StreamTcpClientTest extends StreamClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/SystemTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/SystemTcpClientTest.java index 4dff169..49ecb2a 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/SystemTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/SystemTcpClientTest.java @@ -1,7 +1,7 @@ package rs.iggy.clients.blocking.tcp; import org.junit.jupiter.api.Test; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.SystemClientBaseTest; import rs.iggy.system.ClientInfo; import rs.iggy.system.ClientInfoDetails; @@ -11,7 +11,7 @@ class SystemTcpClientTest extends SystemClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/TopicsTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/TopicsTcpClientTest.java index 406b656..b10d246 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/TopicsTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/TopicsTcpClientTest.java @@ -1,12 +1,12 @@ package rs.iggy.clients.blocking.tcp; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.TopicsClientBaseTest; class TopicsTcpClientTest extends TopicsClientBaseTest { @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); } diff --git a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/UsersTcpClientTest.java b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/UsersTcpClientTest.java index 136727c..75ff9a2 100644 --- a/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/UsersTcpClientTest.java +++ b/java-sdk/src/test/java/rs/iggy/clients/blocking/tcp/UsersTcpClientTest.java @@ -1,7 +1,7 @@ package rs.iggy.clients.blocking.tcp; import org.junit.jupiter.api.BeforeEach; -import rs.iggy.clients.blocking.IggyClient; +import rs.iggy.clients.blocking.IggyBaseClient; import rs.iggy.clients.blocking.UsersClient; import rs.iggy.clients.blocking.UsersClientBaseTest; @@ -10,7 +10,7 @@ class UsersTcpClientTest extends UsersClientBaseTest { protected UsersClient usersClient; @Override - protected IggyClient getClient() { + protected IggyBaseClient getClient() { return TcpClientFactory.create(iggyServer); }