Name
UnavailableException
Synopsis
Class Name: javax.servlet.UnavailableException
Superclass: javax.servlet.ServletException
Immediate Subclasses: None
Interfaces Implemented: None
Availability: Servlet API 1.0 and later
Description
A 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 some
corrective action must be taken on the server) and temporary. A
servlet is temporarily unavailable if some system-wide problem
momentarily prevents it from servicing requests. This may include
network troubles or a crashed or overloaded database server. To mark
a servlet as temporarily unavailable, specify a duration (in seconds)
when constructing the exception. Well-written servers check back
after this time. Servlet implementations are not required to treat
temporary and permanent unavailability differently.
Servers generally provide clients with polite error messages when handling requests for unavailable servlets. For example, the Java Web Server returns a 404 (Unavailable) message.
Class Summary
public class UnavailableException extends ServletException {
// Constructors
public UnavailableException(int seconds, Servlet servlet, String msg);
public UnavailableException(Servlet servlet, String msg);
// Instance Methods
public Servlet getServlet();
public int getUnavailableSeconds();
public boolean isPermanent();
}Constructors
UnavailableException()
public UnavailableException(int ...