public View createView(final ViewConfig config) {
checkNotNull(config);
final AllRequestMatcher binariesRequestMatcher = new AllRequestMatcher();
final Router router = new Router();
final String sourceName = (String) config.getConfiguration().get("sourceName");
checkNotNull(sourceName, "Source name cannot be null for proxy config");
// Ensure the source exists
sourceRegistry.getSource(sourceName);
final ProxyingRawBinariesHandler proxyingWrapper = new ProxyingRawBinariesHandler(binaryStore, sourceName,
sourceRegistry);
final HostedRawBinariesHandler hosted = new HostedRawBinariesHandler(binaryStore);
router.addRoute(binariesRequestMatcher, asList(proxyingWrapper, hosted));
return new View(config, router, notFoundHandler);
}