Java Servlet Programming, 2nd Edition > A. Servlet API Quick Reference > UnavailableException |
SynopsisClass Name: javax.servlet.UnavailableException Superclass: javax.servlet.ServletException Immediate Subclasses: None Interfaces Implemented: None Availability: Servlet API 1.0 and later DescriptionA servlet can throw an UnavailableException at any time to indicate that it is not available to service client requests. There are two types of unavailability: permanent (where the problem will not correct itself and administrative action needs to be taken) and temporary (where the problem will likely correct itself after some length of time). To mark a servlet as temporarily unavailable, specify a duration (in seconds) when constructing the exception. Well-written servlet containers will use the duration to provide better error messages to the client. Servlet implementations are allowed to treat temporary unavailability as permanent unavailability. Class Summarypublic class UnavailableException extends ServletException { // Constructors public UnavailableException(int seconds, Servlet servlet, String msg); // Deprecated public UnavailableException(Servlet servlet, String msg); // Deprecated public UnavailableException(String msg); // New in 2.2 public UnavailableException(String msg, int seconds); // New in 2.2 // Instance methods public Servlet getServlet(); // Deprecated public int getUnavailableSeconds(); public boolean isPermanent(); } ConstructorsUnavailableException()public UnavailableException(String msg) public UnavailableException(String msg, int seconds) public UnavailableException(Servlet servlet, String msg) public UnavailableException(int seconds, Servlet servlet, String msg)
Instance MethodsgetServlet()public Servlet getServlet()
getUnavailableSeconds()public int getUnavailableSeconds()
isPermanent()public boolean isPermanent()
|