Revision 1961 org.gvsig.raster.wmts/trunk/org.gvsig.raster.wmts/org.gvsig.raster.wmts.io/src/main/java/org/gvsig/raster/wmts/io/downloader/TileDownloaderForWMTS.java

View differences:

TileDownloaderForWMTS.java
26 26
import java.net.ConnectException;
27 27
import java.net.URL;
28 28

  
29
import org.gvsig.compat.net.ICancellable;
29 30
import org.gvsig.fmap.dal.coverage.exception.RemoteServiceException;
30 31
import org.gvsig.raster.cache.tile.Tile;
31 32
import org.gvsig.raster.cache.tile.exception.TileGettingException;
......
58 59
	public WMTSConnector getConnector() throws WMTSException {
59 60
		if(connector == null) {
60 61
			WMTSDataParameters p = (WMTSDataParameters)prov.getDataParameters();
62
			connector = p.getConnector();
63
			if(connector != null)
64
				return connector;
65
			
61 66
			URL url = null;
62 67
			try {
63 68
				url = new URL(p.getURI());
......
66 71
			}
67 72
			try {
68 73
				connector = new WMTSConnector(url);
74
				connector.connect(new ICancellable() {
75
					public boolean isCanceled() {
76
						return false;
77
					}
78
					
79
					public Object getID() {
80
						return null;
81
					}
82
				});
69 83
			} catch (ConnectException e) {
70 84
				throw new WMTSException("Connect exception",e);
71 85
			} catch (IOException e) {

Also available in: Unified diff