Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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!

Field Summary
`protected List<InetAddress>` | `bindAddresses`
`static int` | `DEFAULT_TCP_HTTP_LISTEN_PORT`
`protected List<NetworkInterface>` | `networkInterfaces`
`protected Set<String>` | `useAddresses`
`protected Set<String>` | `useInterfaces`

Fields inherited from interface org.teleal.cling.transport.spi.NetworkAddressFactory
`SYSTEM_PROPERTY_NET_ADDRESSES, SYSTEM_PROPERTY_NET_IFACES`

Constructor Summary
`NetworkAddressFactoryImpl()`

Method Summary
`protected void` | `discoverBindAddresses()`
`protected void` | `discoverNetworkInterfaces()`
`InetAddress[]` | `getBindAddresses()`
`protected InetAddress` | `getBindAddressInSubnetOf(InetAddress inetAddress)`
`byte[]` | `getHardwareAddress(InetAddress inetAddress)`
`InterfaceAddress` | `getInterfaceAddress(InetAddress inetAddress)`
`InetAddress` | `getLocalInterfaceAddress(NetworkInterface networkInterface, boolean isIPv6, InetAddress remoteAddress)`
`InetAddress` | `getMulticastGroup()`
`int` | `getMulticastPort()`
`NetworkInterface[]` | `getNetworkInterfaces()`
`int` | `getStreamListenPort()`
`protected boolean` | `isInSubnet(byte[] ip, byte[] network, short prefix)`
`protected boolean` | `isUsableAddress(NetworkInterface networkInterface, InetAddress address)`
`protected boolean` | `isUsableNetworkInterface(NetworkInterface iface)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### NetworkAddressFactoryImpl

    public NetworkAddressFactoryImpl()
                              throws InitializationException

Throws:
  `InitializationException`

Method Detail

### 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)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.