Movatterモバイル変換


[0]ホーム

URL:


CONTENTS |PREV |NEXTJava Remote Method Invocation


5.9 TheRMIFailureHandler Interface

Thejava.rmi.server.RMIFailureHandler interface provides amethod for specifying how the RMI runtime should respond whenserver socket creation fails (except during object export).
package java.rmi.server;public interface RMIFailureHandler {        public boolean failure(Exception ex);}
Thefailuremethod is invoked with the exception that prevented the RMI runtimefrom creating ajava.net.ServerSocket. The methodreturnstrue if the runtime should attempt to retryandfalse otherwise.

Before this method canbe invoked, a failure handler needs to be registered via theRMISocketFactory.setFailureHandler call. If thefailure handler is not set, the RMI runtime attempts to re-createtheServerSocket after waiting for a short period oftime.

Note that theRMIFailureHandler is not called whenServerSocket creation fails upon initial export of theobject. TheRMIFailureHandler will be called whenthere is an attempt to create aServerSocket after afailed accept on thatServerSocket.



CONTENTS |PREV |NEXT
Copyright 1997, 2010, Oracle and/or its affiliates. All rightsreserved.
[8]ページ先頭

©2009-2025 Movatter.jp