|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.jms Interface ExceptionListener
public interface ExceptionListener
如果 JMS 提供者检测到
Connection
对象存在严重问题,它会通知 Connection
对象的 ExceptionListener
(如果已注册了一个异常侦听器)。这是通过调用侦听器的 onException
方法并将其传递到描述问题的 JMSException
参数来实现的。
异常侦听器允许客户端异步获得问题的通知。某些连接只使用消息,因此它们没有其他方式来了解其连接已失败。
JMS 提供者应该在通知客户端之前尝试自己解决连接问题。
version |
| |
See also | setExceptionListener(ExceptionListener) |
If a JMS provider detects a serious problem with a Connection
object, it informs the Connection
object's
ExceptionListener
, if one has been registered.
It does this by calling the listener's onException
method,
passing it a JMSException
argument describing the problem.
An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn that their connection has failed.
A JMS provider should attempt to resolve connection problems itself before it notifies the client of them.
- Version:
- 1.0 - 9 March 1998
- Author:
- Mark Hapner, Rich Burridge
- See Also:
Connection.setExceptionListener(ExceptionListener)
Method Summary | |
---|---|
void |
onException(JMSException exception)
Notifies user of a JMS exception. |
Method Detail |
---|
public void
onException(JMSException exception)
向用户通知 JMS 异常。
exception | JMS 异常 |
onException
void onException(JMSException exception)
- Notifies user of a JMS exception.
- Parameters:
exception
- the JMS exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!