com.sun.nfs

Class NfsHandler


public abstract class NfsHandler
extends RpcHandler

This handler is implemented by the NFS application if it wishes to be notifed of retransmissions. A good example is an NFS client that displays "NFS Server not responding" and "NFS server OK"

Method Summary

abstract void
ok(String server)
Called when a server reply is recieved after a timeout.
abstract boolean
timeout(String server, int retries, int wait)
Called when an NFS request has timed out The RPC code will retransmit NFS requests until the server responds.

Methods inherited from class com.sun.rpc.RpcHandler

ok, timeout

Method Details

ok

public abstract void ok(String server)
Called when a server reply is recieved after a timeout.
Overrides:
ok in interface RpcHandler
Parameters:
server - The name of the server that returned the reply.

timeout

public abstract boolean timeout(String server,
                                int retries,
                                int wait)
Called when an NFS request has timed out The RPC code will retransmit NFS requests until the server responds. The initial retransmission timeout is set by the NFS code and increases exponentially with each retransmission until an upper bound of 30 seconds is reached, e.g. timeouts will be 1, 2, 4, 8, 16, 30, 30, ... sec.

An instance of the NfsHandler class is registered with the setHandler method of the NFS XFileExtensionAccessor.

Overrides:
timeout in interface RpcHandler
Parameters:
server - The name of the server to which the request was sent.
retries - The number of times the request has been retransmitted. After the first timeout retries will be zero.
wait - Total time since first call in milliseconds (cumulative value of all retransmission timeouts).
Returns:
false if retransmissions are to continue. If the method returns true, the RPC layer will abort the retransmissions and return an InterruptedIOException to the application.