Package com.tietoenator.trip.jxp.grid

# Class TdbGridHost

java.lang.Object
com.tietoenator.trip.jxp.session.TdbSessionObject
com.tietoenator.trip.jxp.TdbMessageProvider
com.tietoenator.trip.jxp.grid.TdbGridHost

All Implemented Interfaces:
  `com.tietoenator.trip.jxp.internal.utils.DOMSink`, `Iterable<TdbGridHostPublication>`

public class TdbGridHost extends TdbMessageProvider implements com.tietoenator.trip.jxp.internal.utils.DOMSink, Iterable<TdbGridHostPublication>
Container and manipulation logic for a host on the grid

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TdbGridHost(TdbSession session)`
  Constructor, creates a blank instance
  `TdbGridHost(TdbSession session, String name)`
  Constructor, creates an instance for the named host

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(TdbGridHostPublication publication)`
  Add a new publication to this host's offerings
  `void`
  `get()`
  Retrieve the properties of the grid host.
  `String`
  `getIniFile()`
  Retrieve any host initialization file established for connections to this host
  `String`
  `getName()`
  Retrieve the name of the host
  `int`
  `getPort()`
  Retrieve the port number the grid will use to connect to this host.
  `int`
  `getTimeout()`
  Retrieve the connection timeout established for connections to this host.
  `Iterator<TdbGridHostPublication>`
  `iterator()`
  Retrieve an iterator over the publications offered by this host.
  `List<TdbGridHostPublication>`
  `publications()`
  Retrieve a collection of publications offered by this host.
  `void`
  `put()`
  Store a new/modified host definition.
  `void`
  `remove()`
  Remove the host from the grid.
  `void`
  `setIniFile(String inifile)`
  Establish a host initialization file for connections to this host
  `void`
  `setName(String name)`
  Establish the name of the host
  `void`
  `setPort(int port)`
  Establish the port number the grid will use to connect to this host.
  `void`
  `setTimeout(int timeout)`
  Establist the connection timeout for connections to this host via TRIPnet.

  ### Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider

  `codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages`

  ### Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject

  `cancel, getSession, isCancelable, setCancelable`

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

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

  ### Methods inherited from interface java.lang.Iterable

  `forEach, spliterator`

- ## Constructor Details

  - ### TdbGridHost

    public TdbGridHost(TdbSession session, String name) throws TdbException
    Constructor, creates an instance for the named host
    Parameters:
      `session` - Active session
      `name` - Name or IP address of the cluster host
    Throws:
      `TdbException`

  - ### TdbGridHost

    public TdbGridHost(TdbSession session) throws TdbException
    Constructor, creates a blank instance
    Parameters:
      `session` - Active session
    Throws:
      `TdbException`

- ## Method Details

  - ### getName

    public String getName()
    Retrieve the name of the host
    Returns:
      Host name

  - ### setName

    public void setName(String name)
    Establish the name of the host
    Parameters:
      `name` - Host name

  - ### getIniFile

    public String getIniFile()
    Retrieve any host initialization file established for connections to this host
    Returns:
      Host initialization file, if any

  - ### setIniFile

    public void setIniFile(String inifile)
    Establish a host initialization file for connections to this host
    Parameters:
      `inifile` - Host initialization file

  - ### getPort

    public int getPort()
    Retrieve the port number the grid will use to connect to this host. All connections from the grid to host servers use the TRIPnet protocol.
    Returns:
      Port number

  - ### setPort

    public void setPort(int port)
    Establish the port number the grid will use to connect to this host. All connections from the grid to host servers use the TRIPnet protocol.
    Parameters:
      `port` - Port number

  - ### getTimeout

    public int getTimeout()
    Retrieve the connection timeout established for connections to this host.
    Returns:
      Connection timeout, in milliseconds.

  - ### setTimeout

    public void setTimeout(int timeout)
    Establist the connection timeout for connections to this host via TRIPnet.
    Parameters:
      `timeout` - Connection timeout, in milliseconds

  - ### iterator

    public Iterator<TdbGridHostPublication> iterator()
    Retrieve an iterator over the publications offered by this host.
    Specified by:
      `iterator` in interface `Iterable<TdbGridHostPublication>`
    Returns:
      Publication iterator

  - ### publications

    public List<TdbGridHostPublication> publications()
    Retrieve a collection of publications offered by this host.
    Returns:
      Publication collection

  - ### add

    public void add(TdbGridHostPublication publication)
    Add a new publication to this host's offerings
    Parameters:
      `publication` - New publication to add

  - ### get

    public void get() throws TdbException
    Retrieve the properties of the grid host.

    This method causes network I/O.

    Throws:
      `TdbException`

  - ### put

    public void put() throws TdbException
    Store a new/modified host definition.

    This method causes network I/O.

    Throws:
      `TdbException`

  - ### remove

    public void remove() throws TdbException
    Remove the host from the grid.

    This method causes network I/O.

    Throws:
      `TdbException`