org.ow2.petals.binding.soap.util
Class NetworkUtil

java.lang.Object
  extended by org.ow2.petals.binding.soap.util.NetworkUtil

public class NetworkUtil
extends java.lang.Object

A network class util used to manipulate network related stuff

Author:
Christophe HAMERLING - eBM WebSourcing

Constructor Summary
NetworkUtil()
           
 
Method Summary
static java.util.Set<java.net.NetworkInterface> getAllInterfaces()
          Get all the host interfaces including the loopback one
static java.util.Set<java.net.Inet4Address> getAllIPv4InetAddresses()
          Get all the local IPV4 addresses without the loopback one
static java.util.Set<java.net.NetworkInterface> getAllLocalInterfaces()
          Get all the interfaces which are not loopback ones
static java.util.Set<java.net.Inet4Address> getAllLocalIPv4InetAddresses()
          Get all the IPv4 InetAddress of the local host which are not loopback ones
static boolean isLocalAddress(java.net.InetAddress address)
          Returns true if the given address is not null and is one of the local host address including the loopback address
static boolean isLoopbackAddress(java.net.InetAddress addr)
          Test if the given address is a loopback one ie localhost or 127.0.0.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkUtil

public NetworkUtil()
Method Detail

getAllLocalInterfaces

public static java.util.Set<java.net.NetworkInterface> getAllLocalInterfaces()
Get all the interfaces which are not loopback ones

Returns:

getAllInterfaces

public static java.util.Set<java.net.NetworkInterface> getAllInterfaces()
Get all the host interfaces including the loopback one

Returns:

getAllLocalIPv4InetAddresses

public static java.util.Set<java.net.Inet4Address> getAllLocalIPv4InetAddresses()
Get all the IPv4 InetAddress of the local host which are not loopback ones

Returns:

getAllIPv4InetAddresses

public static java.util.Set<java.net.Inet4Address> getAllIPv4InetAddresses()
Get all the local IPV4 addresses without the loopback one

Returns:

isLocalAddress

public static boolean isLocalAddress(java.net.InetAddress address)
Returns true if the given address is not null and is one of the local host address including the loopback address

Parameters:
address -
Returns:

isLoopbackAddress

public static boolean isLoopbackAddress(java.net.InetAddress addr)
Test if the given address is a loopback one ie localhost or 127.0.0.1

Parameters:
addr -
Returns:


Copyright © 2005-2010 OW2 Consortium. All Rights Reserved.