KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > rmi > server > RMIFailureHandler


1 /*
2  * @(#)RMIFailureHandler.java 1.11 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.rmi.server;
9
10 /**
11  * An <code>RMIFailureHandler</code> can be registered via the
12  * <code>RMISocketFactory.setFailureHandler</code> call. The
13  * <code>failure</code> method of the handler is invoked when the RMI
14  * runtime is unable to create a <code>ServerSocket</code> to listen
15  * for incoming calls. The <code>failure</code> method returns a boolean
16  * indicating whether the runtime should attempt to re-create the
17  * <code>ServerSocket</code>.
18  *
19  * @author Ann Wollrath
20  * @version @(#)RMIFailureHandler.java 1.11, 03/12/19
21  * @since JDK1.1
22  */

23 public interface RMIFailureHandler {
24  
25     /**
26      * The <code>failure</code> callback is invoked when the RMI
27      * runtime is unable to create a <code>ServerSocket</code> via the
28      * <code>RMISocketFactory</code>. An <code>RMIFailureHandler</code>
29      * is registered via a call to
30      * <code>RMISocketFacotry.setFailureHandler</code>. If no failure
31      * handler is installed, the default behavior is to attempt to
32      * re-create the ServerSocket.
33      *
34      * @param ex the exception that occurred during <code>ServerSocket</code>
35      * creation
36      * @return if true, the RMI runtime attempts to retry
37      * <code>ServerSocket</code> creation
38      * @see java.rmi.server.RMISocketFactory#setFailureHandler(RMIFailureHandler)
39      * @since JDK1.1
40      */

41     public boolean failure(Exception JavaDoc ex);
42     
43 }
44
45
Popular Tags