public interface RMIFailureHandler
RMIFailureHandler可以通过RMISocketFactory.setFailureHandler通话进行注册。
当RMI运行时无法创建ServerSocket以侦听来电时,调用处理程序的failure方法。
failure方法返回一个布尔值,指示运行时是否应尝试重新创建ServerSocket 。
boolean failure(异常 ex)
RMISocketFactory创建ServerSocket时,将调用failure回调。
一个RMIFailureHandler通过将呼叫注册RMISocketFacotry.setFailureHandler 。
如果没有安装故障处理程序,则默认行为是尝试重新创建ServerSocket。
ex - 在
ServerSocket创建期间发生的
ServerSocket
ServerSocket创建
RMISocketFactory.setFailureHandler(RMIFailureHandler)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.