Initialize transports on demand

This avoids creating NioEventLoopGroups for unused transports. It also avoids logging a warning if the UDT library is unavailable even when its not used.

I've changed clientToProxyBossPools and clientToProxyWorkerPools to be HashMaps as they are (and were) only accessed while holding a lock on the server group, so the overhead of a CCM is unnecessary. It might be worth going further and making getProxyToServerWorkerFor() synchronized, allowing proxyToServerWorkerPools also to be a plain HashMap.
On 10/07/14 13:29, oxtoacart wrote:
>
> In src/main/java/org/littleshoot/proxy/impl/DefaultHttpProxyServer.java:
>
> >           */
> > -        private final Map<TransportProtocol, EventLoopGroup> clientToProxyBossPools = new ConcurrentHashMap<TransportProtocol, EventLoopGroup>();
> > +        private final Map<TransportProtocol, EventLoopGroup> clientToProxyBossPools = new HashMap<TransportProtocol, EventLoopGroup>();
>
> Actually, I think it's best to keep these as ConcurrentHashMaps, since
> they're read from during start(). These maps are tiny, so the overhead
> of ConcurrentHashMap should be negligible.
>
>



But start() synchronises on the ServerGroup while calling these?