org.teleal.cling.transport.impl
Class NetworkAddressFactoryImpl
java.lang.Object
org.teleal.cling.transport.impl.NetworkAddressFactoryImpl
- All Implemented Interfaces:
- NetworkAddressFactory
public class NetworkAddressFactoryImpl
- extends Object
- implements NetworkAddressFactory
Supports only IPv4! Ignores the "vmnet*" interfaces!
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_TCP_HTTP_LISTEN_PORT
public static final int DEFAULT_TCP_HTTP_LISTEN_PORT
- See Also:
- Constant Field Values
useInterfaces
protected Set<String> useInterfaces
useAddresses
protected Set<String> useAddresses
networkInterfaces
protected List<NetworkInterface> networkInterfaces
bindAddresses
protected List<InetAddress> bindAddresses
NetworkAddressFactoryImpl
public NetworkAddressFactoryImpl()
throws InitializationException
- Throws:
InitializationException
getMulticastGroup
public InetAddress getMulticastGroup()
- Specified by:
getMulticastGroup
in interface NetworkAddressFactory
getMulticastPort
public int getMulticastPort()
- Specified by:
getMulticastPort
in interface NetworkAddressFactory
getStreamListenPort
public int getStreamListenPort()
- Specified by:
getStreamListenPort
in interface NetworkAddressFactory
getNetworkInterfaces
public NetworkInterface[] getNetworkInterfaces()
- Specified by:
getNetworkInterfaces
in interface NetworkAddressFactory
getBindAddresses
public InetAddress[] getBindAddresses()
- Specified by:
getBindAddresses
in interface NetworkAddressFactory
getHardwareAddress
public byte[] getHardwareAddress(InetAddress inetAddress)
- Specified by:
getHardwareAddress
in interface NetworkAddressFactory
getInterfaceAddress
public InterfaceAddress getInterfaceAddress(InetAddress inetAddress)
- Specified by:
getInterfaceAddress
in interface NetworkAddressFactory
getLocalInterfaceAddress
public InetAddress getLocalInterfaceAddress(NetworkInterface networkInterface,
boolean isIPv6,
InetAddress remoteAddress)
- Specified by:
getLocalInterfaceAddress
in interface NetworkAddressFactory
getBindAddressInSubnetOf
protected InetAddress getBindAddressInSubnetOf(InetAddress inetAddress)
isInSubnet
protected boolean isInSubnet(byte[] ip,
byte[] network,
short prefix)
discoverNetworkInterfaces
protected void discoverNetworkInterfaces()
throws InitializationException
- Throws:
InitializationException
isUsableNetworkInterface
protected boolean isUsableNetworkInterface(NetworkInterface iface)
throws Exception
- Throws:
Exception
discoverBindAddresses
protected void discoverBindAddresses()
throws InitializationException
- Throws:
InitializationException
isUsableAddress
protected boolean isUsableAddress(NetworkInterface networkInterface,
InetAddress address)
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.