All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.servlet.UnavailableException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----javax.servlet.ServletException
                           |
                           +----javax.servlet.UnavailableException

public class UnavailableException
extends ServletException
This is a special kind of exception telling the server that this particular servlet is currently not available. It has two kinds of unavailability:
Permanent unavailable
This servlet is now and forever in the future unavailable. If another class in spite of this fact asks this exception for how long it is unavailable it returns a negative number of seconds. (-1 as a matter of fact)
Temporary unavailable The servlet is currently unavailable, but will be available within a certain number of seconds. A class can ask the exception for that number of seconds.

Version:
Servlet API 2.0

Constructor Index

 o UnavailableException(int, Servlet, String)
Constructor for a temporary unavailable exception
 o UnavailableException(Servlet, String)
Constructor for a permanent unavailable exception

Method Index

 o getServlet()
Gets the servlet that is unavailable
 o getUnavailableSeconds()
Gets the number of seconds the servlet is unavailable
 o isPermanent()
Check whether the servlet is permanently unavailable

Constructors

 o UnavailableException
 public UnavailableException(Servlet servlet,
                             String message)
Constructor for a permanent unavailable exception

 o UnavailableException
 public UnavailableException(int seconds,
                             Servlet servlet,
                             String message)
Constructor for a temporary unavailable exception

Methods

 o isPermanent
 public boolean isPermanent()
Check whether the servlet is permanently unavailable

Returns:
whether the servlet is permanently unavailable
 o getServlet
 public Servlet getServlet()
Gets the servlet that is unavailable

 o getUnavailableSeconds
 public int getUnavailableSeconds()
Gets the number of seconds the servlet is unavailable

Returns:
the number of seconds. Negative if permanently unavailable

All Packages  Class Hierarchy  This Package  Previous  Next  Index