javax.servlet

Class 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:
Since:
Servlet API 1.0

Constructor Summary

UnavailableException(String message)
Constructor for a permanent unavailable exception
UnavailableException(String message, int seconds)
Constructor for a temporary unavailable exception
UnavailableException(int seconds, Servlet servlet, String message)
Deprecated.
UnavailableException(Servlet servlet, String message)
Deprecated.

Method Summary

Servlet
getServlet()
Deprecated.
int
getUnavailableSeconds()
Gets the number of seconds the servlet is unavailable
boolean
isPermanent()
Check whether the servlet is permanently unavailable

Methods inherited from class javax.servlet.ServletException

getRootCause

Constructor Details

UnavailableException

public UnavailableException(String message)
Constructor for a permanent unavailable exception
Since:
Servlet API 2.2

UnavailableException

public UnavailableException(String message,
                            int seconds)
Constructor for a temporary unavailable exception
Since:
Servlet API 2.2

UnavailableException

public UnavailableException(int seconds,
                            Servlet servlet,
                            String message)

Deprecated.

Constructor for a temporary unavailable exception
Since:
Servlet API 1.0

UnavailableException

public UnavailableException(Servlet servlet,
                            String message)

Deprecated.

Constructor for a permanent unavailable exception
Since:
Servlet API 1.0

Method Details

getServlet

public Servlet getServlet()

Deprecated.

Gets the servlet that is unavailable
Since:
Servlet API 1.0

getUnavailableSeconds

public int getUnavailableSeconds()
Gets the number of seconds the servlet is unavailable
Returns:
the number of seconds. Negative if permanently unavailable
Since:
Servlet API 1.0

isPermanent

public boolean isPermanent()
Check whether the servlet is permanently unavailable
Returns:
whether the servlet is permanently unavailable
Since:
Servlet API 1.0