//load dispatcher from spring
Dispatcher dispatcher = (Dispatcher) context.getBean("Dispatcher");
//configure an download job filter
DownloadJobFilter filter = new DownloadJobFilter();
filter.setAllowedHostNames(new String[] {".*"});
filter.setMaxRecursionDepth(1);
filter.setSaveToDisk(new String[] {
".*jpg",
".*png",
".*gif"});
//add the filter to the dispatcher