de.hfu.anybeam.networkCore

## Class NetworkEnvironmentSettingsEditor

- java.lang.Object
- - de.hfu.anybeam.networkCore.NetworkEnvironmentSettingsEditor

-     public class NetworkEnvironmentSettingsEditor
      extends java.lang.Object

  Allows automated editing of `NetworkEnvironmentSettings` objects and automatically applies the new settings.
  Since:
    1.0
  Version:
    1.0
  Author:
    chrwuer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NetworkEnvironmentSettingsEditor(NetworkEnvironmentSettings settingToEdit)` Creates a new `NetworkEnvironmentSettingsEditor` for the given `NetworkEnvironmentSettings`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NetworkEnvironment` | `apply(NetworkEnvironment applyTo)` Applies the changes and restarts the `NetworkEnvironment`
    `NetworkEnvironment` | `applyAll(NetworkEnvironmentSettings settings, NetworkEnvironment applyTo)`
    `int` | `getBroadcastPort()`
    `int` | `getDataPort()`
    `java.lang.String` | `getDeviceName()`
    `DeviceType` | `getDeviceType()`
    `byte[]` | `getEncryptionKey()`
    `EncryptionType` | `getEncryptionType()`
    `java.lang.String` | `getOsName()`
    `void` | `setBroadcastPort(int broadcastPort)`
    `void` | `setDataPort(int dataPort)`
    `void` | `setDeviceName(java.lang.String deviceName)`
    `void` | `setDeviceType(DeviceType deviceType)`
    `void` | `setEncryptionKey(byte[] encryptionKey)`
    `void` | `setEncryptionType(EncryptionType encryptionType)`
    `void` | `setOsName(java.lang.String osName)`

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

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

- - ### Constructor Detail

    - #### NetworkEnvironmentSettingsEditor

          public NetworkEnvironmentSettingsEditor(NetworkEnvironmentSettings settingToEdit)

      Creates a new `NetworkEnvironmentSettingsEditor` for the given `NetworkEnvironmentSettings`
      Parameters:
        `settingToEdit` - the `NetworkEnvironmentSettings` which should be edited

  - ### Method Detail

    - #### apply

          public NetworkEnvironment apply(NetworkEnvironment applyTo)

      Applies the changes and restarts the `NetworkEnvironment`
      Parameters:
        `applyTo` - the `NetworkEnvironment` to which the settings should be applied
      Returns:
        a updated NetweorkEnvironment. Keep in mind that the original object was replaced

    - #### applyAll

          public NetworkEnvironment applyAll(NetworkEnvironmentSettings settings,
                                    NetworkEnvironment applyTo)

    - #### getDataPort

          public int getDataPort()

    - #### setDataPort

          public void setDataPort(int dataPort)

    - #### getBroadcastPort

          public int getBroadcastPort()

    - #### setBroadcastPort

          public void setBroadcastPort(int broadcastPort)

    - #### getDeviceName

          public java.lang.String getDeviceName()

    - #### setDeviceName

          public void setDeviceName(java.lang.String deviceName)

    - #### getDeviceType

          public DeviceType getDeviceType()

    - #### setDeviceType

          public void setDeviceType(DeviceType deviceType)

    - #### getEncryptionType

          public EncryptionType getEncryptionType()

    - #### setEncryptionType

          public void setEncryptionType(EncryptionType encryptionType)

    - #### getOsName

          public java.lang.String getOsName()

    - #### setOsName

          public void setOsName(java.lang.String osName)

    - #### getEncryptionKey

          public byte[] getEncryptionKey()

    - #### setEncryptionKey

          public void setEncryptionKey(byte[] encryptionKey)