Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.plugin / org.gvsig.downloader / org.gvsig.downloader.lib / org.gvsig.downloader.lib.api / src / main / java / org / gvsig / downloader / spi / AbstractDownloaderAuthenticationRequester.java @ 47840

History | View | Annotate | Download (1.19 KB)

1
/*
2
 * To change this license header, choose License Headers in Project Properties.
3
 * To change this template file, choose Tools | Templates
4
 * and open the template in the editor.
5
 */
6
package org.gvsig.downloader.spi;
7

    
8
import java.util.concurrent.Executor;
9
import org.gvsig.downloader.DownloaderAuthenticationConfig;
10
import org.gvsig.downloader.DownloaderAuthenticationRequester;
11

    
12
/**
13
 *
14
 * @author jjdelcerro
15
 */
16
public abstract class AbstractDownloaderAuthenticationRequester
17
        implements DownloaderAuthenticationRequester
18
    {
19

    
20
    protected final DownloaderAuthenticationConfig config;
21

    
22
    protected AbstractDownloaderAuthenticationRequester(DownloaderAuthenticationConfig config) {
23
        this.config = config;
24
    }
25
    
26
    @Override
27
    public DownloaderAuthenticationConfig getConfig() {
28
        return this.config;
29
    }
30

    
31
    @Override
32
    public String getProviderName() {
33
        return this.config.getProviderName();
34
    }
35

    
36
    @Override
37
    public String toString() {
38
        return "(BaseURL = '"+this.config.getServiceUrl()+"')";
39
    }
40

    
41
    @Override
42
    public boolean requestAuthorization() {
43
        return this.requestAuthorization((Runnable command) -> { command.run(); });
44
    }
45

    
46
   
47
}