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
,java.lang.Iterable<TdbGridHostPublication>
public class TdbGridHost extends TdbMessageProvider implements com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Iterable<TdbGridHostPublication>
Container and manipulation logic for a host on the grid
-
-
Constructor Summary
Constructors Constructor Description TdbGridHost(TdbSession session)
Constructor, creates a blank instanceTdbGridHost(TdbSession session, java.lang.String name)
Constructor, creates an instance for the named host
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(TdbGridHostPublication publication)
Add a new publication to this host's offeringsvoid
get()
Retrieve the properties of the grid host.java.lang.String
getIniFile()
Retrieve any host initialization file established for connections to this hostjava.lang.String
getName()
Retrieve the name of the hostint
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.java.util.Iterator<TdbGridHostPublication>
iterator()
Retrieve an iterator over the publications offered by this host.java.util.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(java.lang.String inifile)
Establish a host initialization file for connections to this hostvoid
setName(java.lang.String name)
Establish the name of the hostvoid
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
-
-
-
-
Constructor Detail
-
TdbGridHost
public TdbGridHost(TdbSession session, java.lang.String name) throws TdbException
Constructor, creates an instance for the named host- Parameters:
session
- Active sessionname
- 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 Detail
-
getName
public java.lang.String getName()
Retrieve the name of the host- Returns:
- Host name
-
setName
public void setName(java.lang.String name)
Establish the name of the host- Parameters:
name
- Host name
-
getIniFile
public java.lang.String getIniFile()
Retrieve any host initialization file established for connections to this host- Returns:
- Host initialization file, if any
-
setIniFile
public void setIniFile(java.lang.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 java.util.Iterator<TdbGridHostPublication> iterator()
Retrieve an iterator over the publications offered by this host.- Specified by:
iterator
in interfacejava.lang.Iterable<TdbGridHostPublication>
- Returns:
- Publication iterator
-
publications
public java.util.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
-
-