// that has already been instantiated by the caller.
protected HedwigClientImpl(ClientConfiguration cfg, ChannelFactory socketFactory) {
this.cfg = cfg;
this.socketFactory = socketFactory;
if (cfg.isSubscriptionChannelSharingEnabled()) {
channelManager = new MultiplexHChannelManager(cfg, socketFactory);
} else {
channelManager = new SimpleHChannelManager(cfg, socketFactory);
}
pub = new HedwigPublisher(this);
sub = new HedwigSubscriber(this);