Class UnavailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.servlet.ServletException
javax.servlet.UnavailableException
- All Implemented Interfaces:
Serializable
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.
- Since:
- Servlet API 1.0
- Version:
- Servlet API 2.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUnavailableException(int seconds, Servlet servlet, String message) Deprecated.UnavailableException(String message) Constructor for a permanent unavailable exceptionUnavailableException(String message, int seconds) Constructor for a temporary unavailable exceptionUnavailableException(Servlet servlet, String message) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.intGets the number of seconds the servlet is unavailablebooleanCheck whether the servlet is permanently unavailableMethods inherited from class javax.servlet.ServletException
getRootCauseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnavailableException
Constructor for a permanent unavailable exception- Since:
- Servlet API 2.2
-
UnavailableException
Constructor for a temporary unavailable exception- Since:
- Servlet API 2.2
-
UnavailableException
-
UnavailableException
-
-
Method Details
-
isPermanent
public boolean isPermanent()Check whether the servlet is permanently unavailable- Returns:
- whether the servlet is permanently unavailable
- Since:
- Servlet API 1.0
-
getServlet
-