home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / servlet-api.jar / javax / servlet / UnavailableException.class (.txt) < prev   
Encoding:
Java Class File  |  2004-08-28  |  1.3 KB  |  57 lines

  1. package javax.servlet;
  2.  
  3. public class UnavailableException extends ServletException {
  4.    private Servlet servlet;
  5.    private boolean permanent;
  6.    private int seconds;
  7.  
  8.    /** @deprecated */
  9.    public UnavailableException(Servlet servlet, String msg) {
  10.       super(msg);
  11.       this.servlet = servlet;
  12.       this.permanent = true;
  13.    }
  14.  
  15.    /** @deprecated */
  16.    public UnavailableException(int seconds, Servlet servlet, String msg) {
  17.       super(msg);
  18.       this.servlet = servlet;
  19.       if (seconds <= 0) {
  20.          this.seconds = -1;
  21.       } else {
  22.          this.seconds = seconds;
  23.       }
  24.  
  25.       this.permanent = false;
  26.    }
  27.  
  28.    public UnavailableException(String msg) {
  29.       super(msg);
  30.       this.permanent = true;
  31.    }
  32.  
  33.    public UnavailableException(String msg, int seconds) {
  34.       super(msg);
  35.       if (seconds <= 0) {
  36.          this.seconds = -1;
  37.       } else {
  38.          this.seconds = seconds;
  39.       }
  40.  
  41.       this.permanent = false;
  42.    }
  43.  
  44.    public boolean isPermanent() {
  45.       return this.permanent;
  46.    }
  47.  
  48.    /** @deprecated */
  49.    public Servlet getServlet() {
  50.       return this.servlet;
  51.    }
  52.  
  53.    public int getUnavailableSeconds() {
  54.       return this.permanent ? -1 : this.seconds;
  55.    }
  56. }
  57.