View Javadoc

1   package es.caib.signatura.api;
2   
3   import java.net.URL;
4   
5   /**
6    * Exception thrown when the local component of the API needs to be updated.
7    * 
8    * @author u07286
9    *
10   */
11  public class UpgradeNeededException extends Exception {
12  
13  	private URL  url;
14  	
15  	/**
16  	 * Constructor.
17  	 * 
18  	 * @param message
19  	 * @param url
20  	 * @param cause
21  	 */
22  	public UpgradeNeededException(String message, URL url, Throwable cause) {
23  		super(message, cause);
24  		this.url = url;
25  	}
26  
27  	/** 
28  	 * Constructor.
29  	 * 
30  	 * @param message
31  	 * @param url
32  	 */
33  	public UpgradeNeededException(String message, URL url) {
34  		super(message);
35  		this.url = url;
36  	}
37  
38  	/**
39  	 * Gets the URL from which it is possible to update. Usually it will be a link to
40  	 * the Java Web Start descriptor.
41  	 * 
42  	 * @return The update URL.
43  	 */
44  	public URL getUrl() {
45  		return url;
46  	}
47  
48  }