📄 unavailableexception.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_09) on Fri Sep 23 09:41:10 EDT 2005 -->
<TITLE>
UnavailableException (Servlet API Documentation)
</TITLE>
<META NAME="keywords" CONTENT="javax.servlet.UnavailableException class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="UnavailableException (Servlet API Documentation)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UnavailableException.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../javax/servlet/ServletException.html" title="class in javax.servlet"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="UnavailableException.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.servlet</FONT>
<BR>
Class UnavailableException</H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by">java.lang.Throwable
<IMG SRC="../../resources/inherit.gif" ALT="extended by">java.lang.Exception
<IMG SRC="../../resources/inherit.gif" ALT="extended by"><A HREF="../../javax/servlet/ServletException.html" title="class in javax.servlet">javax.servlet.ServletException</A>
<IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>javax.servlet.UnavailableException</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD>
</DL>
<HR>
<DL>
<DT>public class <B>UnavailableException</B><DT>extends <A HREF="../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</A></DL>
<P>
Defines an exception that a servlet or filter throws to indicate
that it is permanently or temporarily unavailable.
<p>When a servlet or filter is permanently unavailable, something is wrong
with it, and it cannot handle
requests until some action is taken. For example, a servlet
might be configured incorrectly, or a filter's state may be corrupted.
The component should log both the error and the corrective action
that is needed.
<p>A servlet or filter is temporarily unavailable if it cannot handle
requests momentarily due to some system-wide problem. For example,
a third-tier server might not be accessible, or there may be
insufficient memory or disk storage to handle requests. A system
administrator may need to take corrective action.
<p>Servlet containers can safely treat both types of unavailable
exceptions in the same way. However, treating temporary unavailability
effectively makes the servlet container more robust. Specifically,
the servlet container might block requests to the servlet or filter for a period
of time suggested by the exception, rather than rejecting them until
the servlet container restarts.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Version$</DD>
<DT><B>Author:</B></DT>
<DD>Various</DD>
<DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#javax.servlet.UnavailableException">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(int, javax.servlet.Servlet, java.lang.String)">UnavailableException</A></B>(int seconds,
<A HREF="../../javax/servlet/Servlet.html" title="interface in javax.servlet">Servlet</A> servlet,
java.lang.String msg)</CODE>
<BR>
<B>Deprecated.</B> <I>As of Java Servlet API 2.2, use <A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(java.lang.String, int)"><CODE>UnavailableException(String, int)</CODE></A> instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(javax.servlet.Servlet, java.lang.String)">UnavailableException</A></B>(<A HREF="../../javax/servlet/Servlet.html" title="interface in javax.servlet">Servlet</A> servlet,
java.lang.String msg)</CODE>
<BR>
<B>Deprecated.</B> <I>As of Java Servlet API 2.2, use <A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(java.lang.String)"><CODE>UnavailableException(String)</CODE></A> instead.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(java.lang.String)">UnavailableException</A></B>(java.lang.String msg)</CODE>
<BR>
Constructs a new exception with a descriptive
message indicating that the servlet is permanently
unavailable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#UnavailableException(java.lang.String, int)">UnavailableException</A></B>(java.lang.String msg,
int seconds)</CODE>
<BR>
Constructs a new exception with a descriptive message
indicating that the servlet is temporarily unavailable
and giving an estimate of how long it will be unavailable.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../javax/servlet/Servlet.html" title="interface in javax.servlet">Servlet</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#getServlet()">getServlet</A></B>()</CODE>
<BR>
<B>Deprecated.</B> <I>As of Java Servlet API 2.2, with no replacement.
Returns the servlet that is reporting its unavailability.</I></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#getUnavailableSeconds()">getUnavailableSeconds</A></B>()</CODE>
<BR>
Returns the number of seconds the servlet expects to
be temporarily unavailable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/servlet/UnavailableException.html#isPermanent()">isPermanent</A></B>()</CODE>
<BR>
Returns a <code>boolean</code> indicating
whether the servlet is permanently unavailable.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_javax.servlet.ServletException"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class javax.servlet.<A HREF="../../javax/servlet/ServletException.html" title="class in javax.servlet">ServletException</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../javax/servlet/ServletException.html#getRootCause()">getRootCause</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Throwable"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -