|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jlab.coda.et.SystemConfig
This class defines a configuration for the creation of an ET system.
| Field Summary | |
(package private) int |
attachmentsMax
Maximum number of attachments. |
(package private) java.util.HashSet |
broadcastAddrs
Set of all local broadcast addresses to listen on (in String form). |
(package private) int |
debug
Debug level. |
(package private) int |
eventSize
Size of the "normal" event in bytes. |
(package private) java.util.HashSet |
multicastAddrs
Set of all multicast addresses to listen on (in String form). |
(package private) int |
multicastPort
UDP port number for thread responding to users' multicasts looking for the ET system. |
(package private) int |
numEvents
Total number of events. |
(package private) int |
serverPort
TCP port number for the thread establishing connections with users, otherwise referred to as the ET server thread. |
(package private) int |
stationsMax
Maximum number of station. |
(package private) int |
udpPort
UDP port number for thread responding to users' broadcasts looking for the ET system. |
| Constructor Summary | |
SystemConfig()
Creates a new SystemConfig object using default parameters. |
|
SystemConfig(SystemConfig config)
Creates a new SystemConfig object from an existing one. |
|
| Method Summary | |
void |
addBroadcastAddr(java.lang.String bCastAddr)
Adds a broadcast address to the set. |
void |
addMulticastAddr(java.lang.String mCastAddr)
Adds a multicast address to the set. |
int |
getAttachmentsMax()
Gets the maximum number of attachments. |
java.util.Set |
getBroadcastAddrs()
Gets the set of broadcast addresses. |
java.lang.String[] |
getBroadcastStrings()
Gets the broadcast addresses as a String array. |
int |
getDebug()
Gets the debug level. |
int |
getEventSize()
Gets the size of the normal events in bytes. |
java.util.Set |
getMulticastAddrs()
Gets the set of multicast addresses. |
int |
getMulticastPort()
Gets the multicast port number. |
java.lang.String[] |
getMulticastStrings()
Gets the multicast addresses as a String array. |
int |
getNumEvents()
Gets the total number of events. |
int |
getServerPort()
Gets the tcp server port number. |
int |
getStationsMax()
Gets the maximum number of stations. |
int |
getUdpPort()
Gets the udp port number. |
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 |
setAttachmentsMax(int num)
Sets the maximum number of attachments. |
void |
setDebug(int level)
Sets the debug level. |
void |
setEventSize(int size)
Sets the event size in bytes. |
void |
setMulticastPort(int port)
Sets the multicast port number. |
void |
setNumEvents(int num)
Sets the total number of events. |
void |
setServerPort(int port)
Sets the tcp server port number. |
void |
setStationsMax(int num)
Sets the maximum number of stations. |
void |
setUdpPort(int port)
Sets the udp port number. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
int numEvents
int eventSize
int stationsMax
int attachmentsMax
int debug
Constants.debugNone meaning
print nothing, Constants.debugSevere meaning print only the
severest errors, Constants.debugError meaning print all errors,
Constants.debugWarn meaning print all errors and warnings, and
finally Constants.debugInfo meaning print all errors, warnings,
and informative messages.
int udpPort
int serverPort
int multicastPort
java.util.HashSet multicastAddrs
java.util.HashSet broadcastAddrs
| Constructor Detail |
public SystemConfig()
Constants.defaultNumEvents,
event size = Constants.defaultEventSize,
max number of stations = Constants.defaultStationsMax,
max number of attachments = Constants.defaultAttsMax,
debug level = Constants.debugError,
udp port = Constants.broadcastPort,
server (tcp) port = Constants.serverPort, and
multicasting port = Constants.multicastPort.
public SystemConfig(SystemConfig config)
| Method Detail |
public int getNumEvents()
public int getEventSize()
public int getStationsMax()
public int getAttachmentsMax()
public int getDebug()
public int getUdpPort()
public int getServerPort()
public int getMulticastPort()
public java.util.Set getMulticastAddrs()
public java.util.Set getBroadcastAddrs()
public java.lang.String[] getMulticastStrings()
public java.lang.String[] getBroadcastStrings()
public void addMulticastAddr(java.lang.String mCastAddr)
throws EtException
mCastAddr - multicast address
EtException - if the argument is not a multicast address
public void addBroadcastAddr(java.lang.String bCastAddr)
throws EtException
bCastAddr - broadcast address
EtException - if the argument is not a broadcast addresspublic void removeMulticastAddr(java.lang.String addr)
addr - multicast addresspublic void removeBroadcastAddr(java.lang.String addr)
addr - broadcast address
public void setNumEvents(int num)
throws EtException
num - total number of events
EtException - if the argument is less than 1
public void setEventSize(int size)
throws EtException
size - event size in bytes
EtException - if the argument is less than 1 byte
public void setStationsMax(int num)
throws EtException
num - maximum number of stations
EtException - if the argument is less than 2
public void setAttachmentsMax(int num)
throws EtException
num - maximum number of attachments
EtException - if the argument is less than 1
public void setDebug(int level)
throws EtException
level - debug level
EtException - if the argument has a bad value
public void setUdpPort(int port)
throws EtException
port - udp port number
EtException - if the argument is less than 1024
public void setServerPort(int port)
throws EtException
port - tcp server port number
EtException - if the argument is less than 1024
public void setMulticastPort(int port)
throws EtException
port - multicast port number
EtException - if the argument is less than 1024
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||