org.bdware.doip.cluster.client.pooledClient.PooledClientByFixedChannelPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of doip-audit-tool Show documentation
Show all versions of doip-audit-tool Show documentation
doip audit tool developed by bdware
The newest version!
package org.bdware.doip.cluster.client.pooledClient;
import org.bdware.doip.codec.doipMessage.DoipMessage;
import org.bdware.doip.endpoint.client.ClientConfig;
import org.bdware.doip.endpoint.client.DoipMessageCallback;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
public class PooledClientByFixedChannelPool {
private NettyClientPooledChannel channels;
String serverURL = null;
public PooledClientByFixedChannelPool(ClientConfig config, int maxConnections) throws URISyntaxException, InterruptedException, MalformedURLException {
this.channels = new NettyClientPooledChannel(config, maxConnections);
this.serverURL = config.url;
}
public void sendMessage(DoipMessage msg, DoipMessageCallback cb) throws Exception {
channels.sendMessage(msg, cb);
}
}