分享
 
 
 

javax.servlet.UnavailableException翻译

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

[/url] [url=file:///F:/资料/文字资料/j2ee-1.4_doc/apidocs/overview-summary.html]Overview

Package

Class

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Ent. Ed. v1.4

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

javax.servlet

Class UnavailableExceptionjava.lang.Object

java.lang.Throwable

java.lang.Exception

javax.servlet.ServletException

javax.servlet.UnavailableException

All Implemented Interfaces: Serializable public class UnavailableException extends ServletExceptionDefines an exception that a servlet or filter throws to indicate that it is permanently or temporarily unavailable. 定义了一种异常,servlet或过滤器抛出表示其永久或暂时不可用。

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. 当servlet或过滤器永久不可用时,说明有错,除非采取措施否则不能处理请求。比如,servlet没有配置正确,或者过滤器的状态被误用。组件应该将错误和需要的采取的正确错误记入日志。

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. 如果sevlet或过滤器因为某些系统问题不能即时处理请求,则其为暂时不可用。比如,三层服务器可能不能被访问,或者内存或磁盘空间不够不足以处理请求。系统管理员可以采取纠正措施。

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. servlet容器可以以相同的方式安全地处理两种类型的不可用。然而,有效地处理暂时不可用 将使servlet容器更可靠。特别地,servlet容器可以将向servlet或过滤器发出的请求阻塞一段异常建议的时间, 而不是拒绝它们直到servlet容器重启。

Version: $Version$ Author: Various See Also: Serialized FormConstructor Summary

UnavailableException(int seconds, Servlet servlet, String msg)

Deprecated. As of Java Servlet API 2.2, use UnavailableException(String, int) instead. 从Java Servlet API 2.2以来,不再推荐使用。用UnavailableException(String, int)替代。

UnavailableException(Servlet servlet, String msg)

Deprecated. As of Java Servlet API 2.2, use UnavailableException(String) instead. 从Java Servlet API 2.2以来,不再推荐使用。用UnavailableException(String)替代。

UnavailableException(String msg)

Constructs a new exception with a descriptive message indicating that the servlet is permanently unavailable. 使用描述信息构建一个新异常,表明servlet永久不可用。

UnavailableException(String msg, int seconds)

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. 使用描述信息构建一个新异常,表明servlet暂时不可用,并给出不可用时间的估计。

Method Summary

Servlet

getServlet()

Deprecated. As of Java Servlet API 2.2, with no replacement. Returns the servlet that is reporting its unavailability. 从Java Servlet API 2.2以来,不再推荐使用。没有替代方法。

int

getUnavailableSeconds()

Returns the number of seconds the servlet expects to be temporarily unavailable. 返回servlet预期不可用的秒数。

boolean

isPermanent()

Returns a boolean indicating whether the servlet is permanently unavailable. 返回布尔值,表明servlet是否永久不可用。

Methods inherited from class javax.servlet.ServletException

getRootCause

Methods inherited from class java.lang.Throwable

fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, )]setStackTrace, toString

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail

UnavailableExceptionpublic UnavailableException(Servlet servlet,

String msg)

Deprecated. As of Java Servlet API 2.2, use UnavailableException(String) instead. 从Java Servlet API 2.2以来,不再推荐使用。用UnavailableException(String)替代。

Parameters: servlet - the Servlet instance that is unavailable 不可用的servlet实例 msg - a String specifying the descriptive message 一个String,表示描述信息UnavailableExceptionpublic UnavailableException(int seconds,

Servlet servlet,

String msg)

Deprecated. As of Java Servlet API 2.2, use UnavailableException(String, int) instead. 从Java Servlet API 2.2以来,不再推荐使用。用UnavailableException(String, int)替代。

Parameters: seconds - an integer specifying the number of seconds the servlet expects to be unavailable; if zero or negative, indicates that the servlet can't make an estimate 一个整数,表明servlet预计不可用的秒数,如果为0或负数, 表明servlet不能做出估计 servlet - the Servlet that is unavailable 不可用的servlet msg - a String specifying the descriptive message, which can be written to a log file or displayed for the user. 一个String,表示描述信息,它会被写入日志文件或显示给用户。UnavailableExceptionpublic UnavailableException(String msg)

Constructs a new exception with a descriptive message indicating that the servlet is permanently unavailable. 使用描述信息构建一个新异常,表明servlet永久不可用。

Parameters: msg - a String specifying the descriptive message 一个String,表示描述信息UnavailableExceptionpublic UnavailableException(String msg,

int seconds)

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. 使用描述信息构建一个新异常,表明servlet暂时不可用,并给出不可用时间的估计。 In some cases, the servlet cannot make an estimate. For example, the servlet might know that a server it needs is not running, but not be able to report how long it will take to be restored to functionality. This can be indicated with a negative or zero value for the seconds argument. 在某些情况下,servlet不可能给出估计值。比如,servlet可能知道它所需要的 服务器不在运行,但是并不能报告要花多久才能恢复功能。如果这样,它将以负数或0表示seconds参数。

Parameters: msg - a String specifying the descriptive message, which can be written to a log file or displayed for the user. 一个String,表示描述信息,它会被写入日志文件或显示给用户。 seconds - an integer specifying the number of seconds the servlet expects to be unavailable; if zero or negative, indicates that the servlet can't make an estimate 一个整数,表明servlet预计不可用的秒数,如果为0或负数, 表明servlet不能做出估计Method Detail

isPermanentpublic boolean isPermanent()

Returns a boolean indicating whether the servlet is permanently unavailable. If so, something is wrong with the servlet, and the system administrator must take some corrective action. 返回布尔值,表明servlet是否永久不可用。 如果是,表示servlet出错, 系统管理员应该采取纠正措施。

Returns: true if the servlet is permanently unavailable; false if the servlet is available or temporarily unavailable 如果servlet永久不可用,返回true,如果servlet可用或暂时不可用,返回falsegetServletpublic Servlet getServlet()

Deprecated. As of Java Servlet API 2.2, with no replacement. Returns the servlet that is reporting its unavailability. 从Java Servlet API 2.2以来,不再推荐使用。没有替代方法。 返回报告不可用的servlet。

Returns: the Servlet object that is throwing the UnavailableException 抛出UnavailableException的Servlet对象getUnavailableSecondspublic int getUnavailableSeconds()

Returns the number of seconds the servlet expects to be temporarily unavailable. 返回servlet预期不可用的秒数。 If this method returns a negative number, the servlet is permanently unavailable or cannot provide an estimate of how long it will be unavailable. No effort is made to correct for the time elapsed since the exception was first reported. 如果方法返回负值,表示servlet永久不可用,不能给出不可用时间的估计值。 从第一次报告异常以来不会采取措施来修正过去的时间。

Returns: an integer specifying the number of seconds the servlet will be temporarily unavailable, or a negative number if the servlet is permanently unavailable or cannot make an estimate 一个整数,表示servlet将暂时不可用的秒数,如果servlet永久不可用,不能给出估计值,返回负数[/url][url=file:///F:/资料/文字资料/j2ee-1.4_doc/apidocs/overview-summary.html]Overview

Package

Class

Tree

Deprecated

Index

Help

JavaTM 2 Platform

Ent. Ed. v1.4

PREV CLASS NEXT CLASS

FRAMES NO FRAMES All Classes

SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature Copyright 2003 Sun Microsystems, Inc. All rights reserved.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有