private List<ConnectInterceptor<?>> interceptingConnectionsTo(
     ConnectionFactory<?> connectionFactory) {
   Class<?> serviceType =
       GenericTypeResolver.resolveTypeArgument(
           connectionFactory.getClass(), ConnectionFactory.class);
   List<ConnectInterceptor<?>> typedInterceptors = connectInterceptors.get(serviceType);
   if (typedInterceptors == null) {
     typedInterceptors = Collections.emptyList();
   }
   return typedInterceptors;
 }