Package com.pixelmed.network

## Class NetworkConfigurationSource

- java.lang.Object
- - com.pixelmed.network.NetworkConfigurationSource

- Direct Known Subclasses:
    `NetworkApplicationProperties.OurNetworkConfigurationSource`, `NetworkConfigurationFromLDAP`, `NetworkConfigurationFromMulticastDNS`

      public abstract class NetworkConfigurationSource
      extends java.lang.Object

  This abstract class provides a source of DICOM network parameters.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `protected class` | `NetworkConfigurationSource.DumpNetworkApplicationInformation` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected static int` | `DefaultDumpInfoInterval` |
    `protected static int` | `DefaultSourceRefreshInterval` |
    `protected NetworkConfigurationSource.DumpNetworkApplicationInformation` | `dumper` |
    `protected java.util.Timer` | `timer` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `NetworkConfigurationSource()` | Construct an instance capable of returning configuration information but do not start anything yet.
    `protected` | `NetworkConfigurationSource​(int debugLevel)` | Construct an instance capable of returning configuration information but do not start anything yet.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `activateDiscovery()` | Start discovery of network configuration, if possible.
    `abstract void` | `activateDiscovery​(int refreshInterval)` | Start discovery of network configuration, if possible.
    `void` | `activateDumper()` | Start dumping current configuration information at regular intervals.
    `void` | `activateDumper​(int dumpInfoInterval)` | Start dumping current configuration information at specified intervals.
    `void` | `close()` | Close down any running threads related to an instance of this class.
    `abstract void` | `deActivateDiscovery()` | Stop discovery.
    `void` | `deActivateDumper()` | Stop dumping current configuration information.
    `NetworkApplicationInformation` | `getNetworkApplicationInformation()` | Return the network application information.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DefaultDumpInfoInterval

          protected static final int DefaultDumpInfoInterval

      See Also:
        Constant Field Values

    - #### DefaultSourceRefreshInterval

          protected static final int DefaultSourceRefreshInterval

      See Also:
        Constant Field Values

    - #### timer

          protected final java.util.Timer timer

    - #### dumper

          protected NetworkConfigurationSource.DumpNetworkApplicationInformation dumper

  - ### Constructor Detail

    - #### NetworkConfigurationSource

          protected NetworkConfigurationSource​(int debugLevel)

      Construct an instance capable of returning configuration information but do not start anything yet.

      Parameters:
        `debugLevel` - ignored

    - #### NetworkConfigurationSource

          protected NetworkConfigurationSource()

      Construct an instance capable of returning configuration information but do not start anything yet.

  - ### Method Detail

    - #### getNetworkApplicationInformation

          public NetworkApplicationInformation getNetworkApplicationInformation()

      Return the network application information.

      Synchronized since the information may be dynamically updated whilst accessible by other threads.

      Returns:
        the network application information

    - #### activateDumper

          public final void activateDumper()

      Start dumping current configuration information at regular intervals.

    - #### activateDumper

          public void activateDumper​(int dumpInfoInterval)

      Start dumping current configuration information at specified intervals.

      Parameters:
        `dumpInfoInterval` - interval in milliseconds

    - #### deActivateDumper

          public void deActivateDumper()

      Stop dumping current configuration information.

    - #### close

          public final void close()

      Close down any running threads related to an instance of this class.

    - #### activateDiscovery

          public final void activateDiscovery()

      Start discovery of network configuration, if possible.

    - #### activateDiscovery

          public abstract void activateDiscovery​(int refreshInterval)

      Start discovery of network configuration, if possible.

      Parameters:
        `refreshInterval` - interval to refresh configuration in milliseconds, 0 if no refresh (runs once only); may be ignored if source is asynchronous

    - #### deActivateDiscovery

          public abstract void deActivateDiscovery()

      Stop discovery.