public static IRiakClient getClient(RiakLocation location) throws RiakException {
// TODO this should use getRawClient, but DefaultRiakClient's
// constructor is wrong visibility
// Either change the visibility or add a method to the factory to accept
// a delegate (the latter!)
IRiakClient client = null;
switch (location.getTransport()) {
case PB:
client = RiakFactory.pbcClient(location.getHost(), location.getPort());
break;
case HTTP: