com.github.thorbenkuck.network.client.ClientContainer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of easy-net Show documentation
Show all versions of easy-net Show documentation
An EventStream driven, simple to use Client/Server framework
package com.github.thorbenkuck.network.client;
import com.github.thorbenkuck.network.RemoteMessage;
import com.github.thorbenkuck.network.connection.ConnectionContext;
import com.github.thorbenkuck.network.encoding.ObjectDecoder;
import com.github.thorbenkuck.network.encoding.ObjectEncoder;
import com.github.thorbenkuck.network.stream.DataStream;
import com.github.thorbenkuck.network.stream.EventStream;
import java.io.Closeable;
import java.io.IOException;
import java.util.function.Consumer;
public interface ClientContainer extends AutoCloseable {
static ClientContainer open(String address, int port) throws IOException {
return open(address, port, new BlockingTCPConnectionFactory());
}
static ClientContainer open(String address, int port, ClientConnectionFactory clientConnectionFactory) throws IOException {
return new NativeClientContainer(address, port, clientConnectionFactory);
}
static Builder builder() {
return new ClientBuilder();
}
String getTargetAddress();
int getTargetPort();
void truncate(ClientContainer clientContainer);
void append(ClientContainer clientContainer);
EventStream output();
DataStream