if (object instanceof CouchDbClient) {
client = (CouchDbClient) object;
description = "uri=" + client.getDBUri();
} else if (object instanceof CouchDbProperties) {
final CouchDbProperties properties = (CouchDbProperties) object;
client = new CouchDbClient(properties);
description = "uri=" + client.getDBUri() + ", username=" + properties.getUsername()
+ ", passwordHash=" + NameUtil.md5(password + CouchDBProvider.class.getName())
+ ", maxConnections=" + properties.getMaxConnections() + ", connectionTimeout="
+ properties.getConnectionTimeout() + ", socketTimeout=" + properties.getSocketTimeout();
} else if (object == null) {
LOGGER.error("The factory method [{}.{}()] returned null.", factoryClassName, factoryMethodName);
return null;
} else {
LOGGER.error("The factory method [{}.{}()] returned an unsupported type [{}].", factoryClassName,