de.esprit.netsuite.server.config

## Class ServerNetworkConfig

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.common.util.TransferableObject
    - - de.esprit.netsuite.server.config.AbstractServerConfig
      - - de.esprit.netsuite.server.config.ServerNetworkConfig

- All Implemented Interfaces:
    Clearable, DeepCloneable, Dumpable, java.io.Serializable, java.lang.Cloneable

      public class ServerNetworkConfig
      extends AbstractServerConfig
      implements Clearable

  This class encapsulates the entries in the network configuration file.
  Author:
    Rainer Buesch
  See Also:
    `ServerConfigFile.NETWORK`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `coServerConnectionsTable`
    `static java.lang.String` | `coServersKey`
    `static java.lang.String` | `hostNameKey`
    `static java.lang.String` | `networkConfigType`
    `static java.lang.String` | `portKey`
    `static java.lang.String` | `serverHostsTable`
    `static java.lang.String` | `serverNameKey`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServerNetworkConfig()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCoServerConnections(java.lang.String serverName, java.lang.String... coServerNames)`
    `void` | `addServerHost(java.lang.String serverName, java.lang.String hostName, int port)`
    `void` | `clear()` Clears the content
    `ServerHost` | `fetchServerHostByName(java.lang.String serverName)`
    `java.util.List<ServerHost>` | `getCoClientsOf(java.lang.String serverName)`
    `java.util.List<ServerHost>` | `getCoServersOf(java.lang.String serverName)`
    `java.util.List<ServerHost>` | `getDefinedServerHosts()` Returns all `ServerHost`s defined in the network config file
    `void` | `read(ApplicationContext ctx, java.io.File inputFile)`
    `void` | `removeAllCoServerConnectionsOf(java.lang.String serverName)`
    `boolean` | `removeCoServerFromServer(java.lang.String serverName, java.lang.String coServerName)`
    `boolean` | `removeServerHost(java.lang.String serverName)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `void` | `write(ApplicationContext ctx, java.io.File outputFile)`

    - ### Methods inherited from class de.esprit.netsuite.server.config.AbstractServerConfig

      `equals, getConfigFileIn, getConfigFileName, hashCode, read, toString, write`

    - ### Methods inherited from class de.esprit.common.util.TransferableObject

      `clone, deepClone`

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### networkConfigType

          public static final java.lang.String networkConfigType

      See Also:
        Constant Field Values

    - #### serverHostsTable

          public static final java.lang.String serverHostsTable

      See Also:
        Constant Field Values

    - #### coServerConnectionsTable

          public static final java.lang.String coServerConnectionsTable

      See Also:
        Constant Field Values

    - #### serverNameKey

          public static final java.lang.String serverNameKey

      See Also:
        Constant Field Values

    - #### hostNameKey

          public static final java.lang.String hostNameKey

      See Also:
        Constant Field Values

    - #### portKey

          public static final java.lang.String portKey

      See Also:
        Constant Field Values

    - #### coServersKey

          public static final java.lang.String coServersKey

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ServerNetworkConfig

          public ServerNetworkConfig()

  - ### Method Detail

    - #### clear

          public void clear()

      Description copied from interface: `Clearable`
      Clears the content
      Specified by:
        `clear` in interface `Clearable`

    - #### addServerHost

          public void addServerHost(java.lang.String serverName,
                           java.lang.String hostName,
                           int port)

    - #### removeServerHost

          public boolean removeServerHost(java.lang.String serverName)

    - #### removeAllCoServerConnectionsOf

          public void removeAllCoServerConnectionsOf(java.lang.String serverName)

    - #### addCoServerConnections

          public void addCoServerConnections(java.lang.String serverName,
                                    java.lang.String... coServerNames)

    - #### removeCoServerFromServer

          public boolean removeCoServerFromServer(java.lang.String serverName,
                                         java.lang.String coServerName)

    - #### read

          public void read(ApplicationContext ctx,
                  java.io.File inputFile)
                    throws java.lang.Exception

      Specified by:
        `read` in class `AbstractServerConfig`
      Throws:
        `java.lang.Exception`

    - #### write

          public void write(ApplicationContext ctx,
                   java.io.File outputFile)
                     throws java.lang.Exception

      Specified by:
        `write` in class `AbstractServerConfig`
      Throws:
        `java.lang.Exception`

    - #### getDefinedServerHosts

          public final java.util.List<ServerHost> getDefinedServerHosts()

      Returns all `ServerHost`s defined in the network config file

    - #### getCoClientsOf

          public java.util.List<ServerHost> getCoClientsOf(java.lang.String serverName)

    - #### getCoServersOf

          public java.util.List<ServerHost> getCoServersOf(java.lang.String serverName)

    - #### fetchServerHostByName

          public final ServerHost fetchServerHostByName(java.lang.String serverName)

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

Copyright © 2014 EsprIT-Systems. All Rights Reserved.