org.jppf.utils
Class VersionUtils

java.lang.Object
  extended by org.jppf.utils.VersionUtils

public final class VersionUtils
extends Object

This class provides a utility method to determine the JPPF build number available in the class path.
It is used for the nodes to determine when their code is outdated, in which case they will automatically reload their own code.

Author:
Laurent Cohen

Method Summary
static int getBuildNumber()
          Determine the current JPPF build number.
static String getLocalIpAddress()
          Get the IP address of the current host.
static void setBuildNumber(int buildNumber)
          Set the current JPPF build number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBuildNumber

public static int getBuildNumber()
Determine the current JPPF build number.

Returns:
the number found in the classpath, or 0 if it is not found.

setBuildNumber

public static void setBuildNumber(int buildNumber)
Set the current JPPF build number.

Parameters:
buildNumber - the build number to set.

getLocalIpAddress

public static String getLocalIpAddress()
Get the IP address of the current host.

Returns:
the IP address as a string in the format "a.b.c.d".


Copyright © 2005-2010 JPPF Team.