Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

Copyright © 2006 Sun Microsystems, Inc. All rights reserved.

JSR-927 (Maintenance Release)

javax.tv.net
Class InterfaceMap

java.lang.Object
  extended byjavax.tv.net.InterfaceMap

public class InterfaceMap
extends java.lang.Object

Class InterfaceMap reports the local IP address assigned to a given service component that carries IP data. Applications may use the returned IP address to specify the network interface to which an instance of java.net.DatagramSocket or java.net.MulticastSocket should bind.

See Also:
java.net.DatagramSocket(int, java.net.InetAddress), java.net.MulticastSocket.setInterface(java.net.InetAddress)

Method Summary
static java.net.InetAddress getLocalAddress(Locator locator)
          Reports the local IP address assigned to the given service component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLocalAddress

public static java.net.InetAddress getLocalAddress(Locator locator)
                                            throws InvalidLocatorException,
                                                   java.io.IOException
Reports the local IP address assigned to the given service component.

Parameters:
locator - The service component for which the local IP address mapping is required.
Returns:
The IP address assigned to this service component.
Throws:
InvalidLocatorException - If the given locator does not refer to a valid source of IP data, or if this system does not support the reception of broadcast IP data.
java.io.IOException - If a local IP address is not available to be assigned to the source of IP data.

JSR-927 (Maintenance Release)

Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to License Terms. Your use of this web site or any of its content or software indicates your agreement to be bound by these License Terms.

For more information, please consult the JSR 927 specification.