|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jlab.coda.et.SystemOpenConfig
This class defines parameters used to open an ET system.
| Field Summary | |
(package private) java.util.HashSet |
broadcastAddrs
Local subnet broadcast addresses. |
(package private) int |
contactMethod
Means used to contact an ET system. |
(package private) java.lang.String |
host
Either ET system host name or destination of broadcasts and multicasts. |
(package private) java.util.HashSet |
multicastAddrs
Multicast addresses. |
(package private) int |
multicastPort
Port number to multicast to. |
(package private) java.lang.String |
name
ET system name. |
(package private) int |
responsePolicy
Policy on what to do about multiple responding ET systems to a broadcast or multicast. |
(package private) int |
tcpPort
TCP server port number of the ET system. |
(package private) int |
ttl
Time-to_live value for multicasting. |
(package private) int |
udpPort
UDP port number for broadcasting or sending udp packets to known hosts. |
| Constructor Summary | |
SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection bAddrs,
java.util.Collection mAddrs,
int method,
int tPort,
int uPort,
int mPort,
int ttlNum,
int policy)
Most general constructor for creating a new SystemOpenConfig object. |
|
SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection bAddrs,
int uPort)
Constructor for broadcasting. |
|
SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection mAddrs,
int mPort,
int ttlNum)
Constructor for multicasting. |
|
SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection mAddrs,
int uPort,
int mPort,
int ttlNum)
Constructor for multicasting. |
|
SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
int tPort)
Constructor for connecting directly to tcp server. |
|
SystemOpenConfig(SystemOpenConfig config)
Constructor to create a new SystemOpenConfig object from another. |
|
| Method Summary | |
void |
addBroadcastAddr(java.lang.String addr)
Adds a broadcast address to the set. |
void |
addMulticastAddr(java.lang.String addr)
Adds a multicast address to the set. |
java.util.HashSet |
getBroadcastAddrs()
Gets local subnet broadcast addresses (as a set of Strings). |
int |
getContactMethod()
Gets the means used to contact an ET system. |
java.lang.String |
getEtName()
Gets the ET system name. |
java.lang.String |
getHost()
Gets the ET system host name or broad/multicast destination. |
java.util.HashSet |
getMulticastAddrs()
Gets multicast addresses (as set of Strings). |
int |
getMulticastPort()
Gets port number to multicast to. |
int |
getNumBroadcastAddrs()
Gets the number of local subnet broadcast addresses. |
int |
getNumMulticastAddrs()
Gets the number of multicast addresses. |
int |
getResponsePolicy()
Gets policy on what to do about multiple responding ET systems to a broadcast or multicast. |
int |
getTcpPort()
Gets TCP server port number of the ET system. |
int |
getTTL()
Gets time-to_live value for multicasting. |
int |
getUdpPort()
Gets UDP port number for broadcasting or sending udp packets to known hosts. |
void |
removeBroadcastAddr(java.lang.String addr)
Removes a broadcast address from the set. |
void |
removeMulticastAddr(java.lang.String addr)
Removes a multicast address from the set. |
void |
setBroadcastAddrs(java.util.Collection addrs)
Adds a collection of broadcast addresses to the set. |
void |
setContactMethod(int method)
Sets the means or method of contacting an ET system. |
void |
setEtName(java.lang.String etName)
Sets the ET system name. |
void |
setHost(java.lang.String hostName)
Sets the ET system host name or broad/multicast destination. |
void |
setMulticastAddrs(java.util.Collection addrs)
Adds a collection of multicast addresses to the set. |
void |
setMulticastPort(int port)
Sets the port number to multicast to. |
void |
setResponsePolicy(int policy)
Sets the policy on what to do about multiple responding ET systems to a broadcast or multicast. |
void |
setTcpPort(int port)
Sets the TCP server port number of the ET system. |
void |
setTTL(int ttlNum)
Sets the Time-to_live value for multicasting. |
void |
setUdpPort(int port)
Sets the UDP port number for broadcastiong and sending udp packets to known hosts. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
java.lang.String name
java.lang.String host
java.util.HashSet broadcastAddrs
java.util.HashSet multicastAddrs
int contactMethod
Constants.broadcast for broadcasting, Constants.multicast
for multicasting, Constants.direct for connecting directly to the
ET tcp server, Constants.broadAndMulticast for using both
broadcasting and multicasting, and Constants.udpToHost for sending
a udp packet to a known host to find an ET system.
int udpPort
int tcpPort
int multicastPort
int ttl
int responsePolicy
Constants.policyFirst which
chooses the first ET system to respond, Constants.policyLocal
which chooses the first local ET system to respond and if none then the
first response, or Constants.policyError which throws an
EtTooManyException exception.
| Constructor Detail |
public SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection bAddrs,
java.util.Collection mAddrs,
int method,
int tPort,
int uPort,
int mPort,
int ttlNum,
int policy)
throws EtException
etName - ET system namehostName - ET system host name or destination of broad/multicastsbAddrs - Collection of local subnet broadcast addresses (as Strings)mAddrs - Collection of multicast addresses (as Strings)method - Means used to contact an ET systemtPort - TCP server port number of the ET systemuPort - UDP port number for broadcasting or sending udp packets to known hostsmPort - Port number to multicast tottlNum - Time-to_live value for multicastingpolicy - Policy on what to do about multiple responding ET systems to
a broadcast or multicast
EtException - if method is not Constants.broadcast,
Constants.multicast, Constants.direct,
Constants.broadAndMulticast, or
Constants.udpToHost.
EtException - if method is not direct and no broad/multicast addresses were
specified, or if method is direct and no actual host name was
specified.
EtException - if port numbers are < 1024 or > 65535
EtException - if ttl is < 0 or > 254
EtException - if policy is not Constants.policyFirst,
Constants.policyLocal, or Constants.policyError
public SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection bAddrs,
int uPort)
throws EtException
etName - ET system namehostName - ET system host name or destination of broadcastsbAddrs - Collection of local subnet broadcast addresses (as Strings)uPort - UDP port number to broadcast to
EtException - if no broadcast addresses were specified
EtException - if port number is < 1024 or > 65535
public SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection mAddrs,
int mPort,
int ttlNum)
throws EtException
etName - ET system namehostName - ET system host name or destination of multicastsmAddrs - Collection of multicast addresses (as Strings)mPort - Port number to multicast tottlNum - Time-to_live value for multicasting
EtException - if no multicast addresses were specified
EtException - if port number is < 1024 or > 65535, or ttl is < 0 or > 254
public SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
java.util.Collection mAddrs,
int uPort,
int mPort,
int ttlNum)
throws EtException
etName - ET system namehostName - ET system host name or destination of multicastsmAddrs - Collection of multicast addresses (as Strings)uPort - Port number to send direct udp packet tomPort - Port number to multicast tottlNum - Time-to_live value for multicasting
EtException - if no multicast addresses were specified
EtException - if port numbers are < 1024 or > 65535, or ttl is < 0 or > 254
public SystemOpenConfig(java.lang.String etName,
java.lang.String hostName,
int tPort)
throws EtException
etName - ET system namehostName - ET system host nametPort - TCP server port number of the ET system
EtException - if no actual host name was specified.
EtException - if port number is < 1024 or > 65535public SystemOpenConfig(SystemOpenConfig config)
| Method Detail |
public java.lang.String getEtName()
public java.lang.String getHost()
public java.util.HashSet getBroadcastAddrs()
public java.util.HashSet getMulticastAddrs()
public int getContactMethod()
public int getResponsePolicy()
public int getUdpPort()
public int getTcpPort()
public int getMulticastPort()
public int getTTL()
public int getNumBroadcastAddrs()
public int getNumMulticastAddrs()
public void setEtName(java.lang.String etName)
etName - ET system namepublic void setHost(java.lang.String hostName)
public void removeBroadcastAddr(java.lang.String addr)
addr - broadcast address to be removedpublic void removeMulticastAddr(java.lang.String addr)
addr - multicast address to be removed
public void addBroadcastAddr(java.lang.String addr)
throws EtException
addr - broadcast address to be added
EtException - if the address is not a broadcast address
public void addMulticastAddr(java.lang.String addr)
throws EtException
addr - multicast address to be added
EtException - if the address is not a multicast address
public void setBroadcastAddrs(java.util.Collection addrs)
throws EtException
addrs - collection of broadcast addresses to be added
EtException - if one of the addresses is not a broadcast address
public void setMulticastAddrs(java.util.Collection addrs)
throws EtException
addrs - collection of multicast addresses to be added
EtException - if one of the addresses is not a multicast address
public void setContactMethod(int method)
throws EtException
Constants.broadcast for broadcasting, Constants.multicast
for multicasting, Constants.direct for connecting directly to the
ET tcp server, Constants.broadAndMulticast for using both
broadcasting and multicasting, and Constants.udpToHost for sending
a udp packet to a known host to find an ET system.
method - means or method of contacting an ET system
EtException - if the argument has a bad value
public void setResponsePolicy(int policy)
throws EtException
Constants.policyFirst which chooses the first ET system to
respond, Constants.policyLocal which chooses the first local ET
system to respond and if none then the first response, or
Constants.policyError which throws an EtTooManyException
exception.
policy - policy on what to do about multiple responding ET systems
EtException - if the argument has a bad value or if the policy says to choose a local
ET system but the host is set to chose a remote system.
public void setUdpPort(int port)
throws EtException
port - UDP port number for broadcasting and sending udp packets to known hosts
EtException - if the port number is < 1024 or > 65535
public void setTcpPort(int port)
throws EtException
port - TCP server port number of the ET system
EtException - if the port number is < 1024 or > 65535
public void setMulticastPort(int port)
throws EtException
port - port number to multicast to
EtException - if the port number is < 1024 or > 65535
public void setTTL(int ttlNum)
throws EtException
ttlNum - time-to_live value for multicasting
EtException - if the port number is < 0 or > 254
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||