Preconditions.checkNotNull(clientType, "clientType is null");
Preconditions.checkNotNull(clientName, "clientName is null");
Preconditions.checkNotNull(codecManager, "codecManager is null");
this.clientName = clientName;
thriftServiceMetadata = new ThriftServiceMetadata(clientType, codecManager.getCatalog());
this.clientType = thriftServiceMetadata.getName();
ImmutableMap.Builder<Method, ThriftMethodHandler> methods = ImmutableMap.builder();
for (ThriftMethodMetadata methodMetadata : thriftServiceMetadata.getMethods().values()) {
ThriftMethodHandler methodHandler = new ThriftMethodHandler(methodMetadata, codecManager);
methods.put(methodMetadata.getMethod(), methodHandler);