Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

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 exception indicates that a servlet is unavailable. Servlets may report this exception at any time, and the network service running the servlet should behave appropriately. There are two types of unavailability, and sophisticated services will to deal with these differently:

Network services may safely treat both types of exceptions as "permanent", but good treatment of temporary unavailability leads to more robust network services. Specifically, requests to the servlet might be blocked (or otherwise deferred) for a servlet-suggested amount of time, rather than being rejected until the service itself restarts.


Constructor Summary
 UnavailableException(Servlet servlet, String msg)
Constructs a new exception with the specified descriptive message, indicating that the servlet is permanently unavailable.
 UnavailableException(int seconds, Servlet servlet, String msg)
Constructs a new exception with the specified descriptive message, indicating that the servlet is temporarily unavailable and giving an estimate of how long it will be unavailable.
 

Method Summary
Servlet  getServlet()
Returns the servlet that is reporting its unavailability.
int  getUnavailableSeconds()
Returns the amount of time the servlet expects to be temporarily unavailable.
boolean  isPermanent()
Returns true if the servlet is "permanently" unavailable, indicating that the service administrator must take some corrective action to make the servlet be usable.
 
Methods inherited from class java.lang.Throwable
 fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnavailableException

public UnavailableException(Servlet servlet,
                            String msg)
Constructs a new exception with the specified descriptive message, indicating that the servlet is permanently unavailable.
Parameters:
servlet - the servlet which is unavailable
msg - the descriptive message

UnavailableException

public UnavailableException(int seconds,
                            Servlet servlet,
                            String msg)
Constructs a new exception with the specified descriptive message, indicating that the servlet is temporarily unavailable and giving an estimate of how long it will be unavailable. In some cases, no estimate can be made; this is indicated by a non-positive time. For example, the servlet might know a server it needs is "down", but not be able to report how long it will take to restore it to an adequate level of functionality.
Parameters:
seconds - number of seconds that the servlet is anticipated to be unavailable. If negative or zero, no estimate is available.
servlet - the servlet which is unavailable
msg - the descriptive message
Method Detail

isPermanent

public boolean isPermanent()
Returns true if the servlet is "permanently" unavailable, indicating that the service administrator must take some corrective action to make the servlet be usable.

getServlet

public Servlet getServlet()
Returns the servlet that is reporting its unavailability.

getUnavailableSeconds

public int getUnavailableSeconds()
Returns the amount of time the servlet expects to be temporarily unavailable. If the servlet is permanently unavailable, or no estimate was provided, returns a negative number. No effort is made to correct for the time elapsed since the exception was first reported.

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.