All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bdware.doip.cluster.client.pooledClient.PooledClientByFixedChannelPool Maven / Gradle / Ivy

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy