From 32282980ab4ac7d0e2bf4e58c9b62c695ca931ae Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 15 Mar 2005 18:45:02 +0000 Subject: [PATCH] exception helpers --- bindings/java/src/net/hyperic/sigar/NfsFileSystem.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bindings/java/src/net/hyperic/sigar/NfsFileSystem.java b/bindings/java/src/net/hyperic/sigar/NfsFileSystem.java index 996af54e..a03bd7f6 100644 --- a/bindings/java/src/net/hyperic/sigar/NfsFileSystem.java +++ b/bindings/java/src/net/hyperic/sigar/NfsFileSystem.java @@ -33,6 +33,14 @@ public class NfsFileSystem extends FileSystem { return ping(getHostname()); } + public String getUnreachableMessage() { + return getDevName() + " nfs server unreachable"; + } + + public NfsUnreachableException getUnreachableException() { + return new NfsUnreachableException(getUnreachableMessage()); + } + public static void main(String[] args) throws Exception { Sigar.load(); System.out.println(NfsFileSystem.ping(args[0]));