Package 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"
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NfsHandler

      public NfsHandler()
  • Method Details

    • 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 class 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.
    • ok

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