标签:servletexception类 unavailableexception
构造一个包含指定的描述信息的新的异常。如果这个构造函数有一个关于秒数的参数,这将给出 Servlet 发生临时无效后,能够重新处理请求的估计时间。如果不包含这个参数,这意味着这个 Servlet 永久无效。
如果这个 Servlet 永久无效,返回布尔值 true,指示必须采取一些管理行动以使得这个Servlet 可用。
package javax.servlet; public class UnavailableException extends ServletException { private Servlet servlet; private boolean permanent; private int seconds; /** @deprecated */ public UnavailableException(Servlet servlet, String msg) { super(msg); this.servlet = servlet; this.permanent = true; } /** @deprecated */ public UnavailableException(int seconds, Servlet servlet, String msg) { super(msg); this.servlet = servlet; if (seconds <= 0) this.seconds = -1; else this.seconds = seconds; this.permanent = false; } public UnavailableException(String msg) { super(msg); this.permanent = true; } public UnavailableException(String msg, int seconds) { super(msg); if (seconds <= 0) this.seconds = -1; else { this.seconds = seconds; } this.permanent = false; } public boolean isPermanent() { return this.permanent; } /** @deprecated */ public Servlet getServlet() { return this.servlet; } public int getUnavailableSeconds() { return this.permanent ? -1 : this.seconds; } }
Servlet--ServletException类,UnavailableException类
标签:servletexception类 unavailableexception
原文地址:http://blog.csdn.net/u011794238/article/details/46502471