// Bind ThriftClientConfig with random @Named annotation
// We generate a random Named annotation for binding the ThriftClientConfig because we
// need one of these for each clientType+annotationType pair. Without this, the
// ThriftClientConfig bindings collapse to a single instance which is shared by all
// clients.
Named thriftClientConfigKey = Names.named(UUID.randomUUID().toString());
bindConfig(binder).annotatedWith(thriftClientConfigKey).prefixedWith(typeName).to(ThriftClientConfig.class);
// Bind ThriftClient to a provider which knows how to find the ThriftClientConfig using
// the random @Named annotation
Multibinder<ThriftClientEventHandler> eventHandlersBinder = Multibinder.newSetBinder(binder,