public class EtSystemOpen
extends java.lang.Object
Constructor and Description |
---|
EtSystemOpen(EtSystemOpenConfig config)
Constructor which stores copy of argument.
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
Creates a connection to an ET system.
|
void |
disconnect()
Disconnect from the ET system server.
|
java.lang.String[] |
getAllHosts()
Gets all host names when multiple ET systems respond.
|
int[] |
getAllPorts()
Gets all port numbers when multiple ET systems respond.
|
java.util.ArrayList<java.lang.String> |
getBroadcastAddresses()
Gets list of all the broadcast addresses (dot decimal)
of the host the opened ET system is running on.
|
EtSystemOpenConfig |
getConfig()
Gets a copy of the EtSystemOpenConfig configuration object.
|
int |
getDebug()
Gets the debug output level.
|
int |
getEndian()
Gets the endian value of the opened ET system.
|
long |
getEventSize()
Gets the size of the normal events in bytes of the opened ET system.
|
java.lang.String |
getHostAddress()
Gets the address (dot decimal) of the host the opened ET system is running on.
|
java.util.ArrayList<java.lang.String> |
getHostAddresses()
Gets list of all the IP addresses (dot decimal)
of the host the opened ET system is running on.
|
EtJniAccess |
getJni()
Gets the object used to access native methods when using local, C-based ET system.
|
int |
getLanguage()
Gets the language used to implement the opened ET system.
|
java.lang.String |
getLocalAddress()
Gets the local address (dot decimal) used to connect to ET system.
|
java.lang.String |
getName()
Gets the name of the ET system (file).
|
int |
getNumEvents()
Gets the total number of events of the opened ET system.
|
java.util.LinkedHashMap<java.util.ArrayList<java.lang.String>[],java.lang.Integer> |
getResponders()
Gets a map of the hosts and ports of responding ET systems to broad/multicasts.
|
int |
getSelectInts()
Gets the number of station select integers of the opened ET system.
|
java.net.Socket |
getSocket()
Gets the socket connecting this object to the ET system.
|
int |
getTcpPort()
Gets the tcp server port number of the opened ET system.
|
int |
getVersion()
Gets the major version number of the opened ET system.
|
boolean |
isBit64()
Gets whether the operating system is 64 bit or not.
|
boolean |
isConnected()
Gets whether the ET system is connected (opened) or not.
|
void |
setDebug(int debug)
Sets the debug output level.
|
boolean |
usingJniLibrary()
Gets whether a local, C-based ET system was opened and a JNI library was used
to access events directly instead of over sockets.
|
public EtSystemOpen(EtSystemOpenConfig config)
config
- EtSystemOpenConfig objectpublic void setDebug(int debug) throws org.jlab.coda.et.exception.EtException
EtConstants.debugNone
,
EtConstants.debugSevere
, EtConstants.debugError
,
EtConstants.debugWarn
, or EtConstants.debugInfo
.debug
- debug levelorg.jlab.coda.et.exception.EtException
- if bad argument valuepublic int getNumEvents()
public long getEventSize()
public int getTcpPort()
public java.lang.String getLocalAddress()
public java.lang.String getHostAddress()
public java.util.ArrayList<java.lang.String> getHostAddresses()
public java.util.ArrayList<java.lang.String> getBroadcastAddresses()
public java.lang.String getName()
public int getEndian()
public int getVersion()
public int getLanguage()
public int getSelectInts()
public java.net.Socket getSocket()
public int getDebug()
public EtSystemOpenConfig getConfig()
public boolean isConnected()
public boolean isBit64()
true
if the operating system is 64 bit, else false
public java.util.LinkedHashMap<java.util.ArrayList<java.lang.String>[],java.lang.Integer> getResponders()
public boolean usingJniLibrary()
true
if opening a local, C-based ET system and using JNI library
to access events.public EtJniAccess getJni()
public java.lang.String[] getAllHosts()
public int[] getAllPorts()
public void connect() throws java.io.IOException, org.jlab.coda.et.exception.EtException, org.jlab.coda.et.exception.EtTooManyException
java.io.IOException
- if problems with network communications;
if the host address(es) is(are) unknownorg.jlab.coda.et.exception.EtException
- if the responding ET system has the wrong name, runs a different
version of ET, or has a different value for
EtConstants.stationSelectInts
org.jlab.coda.et.exception.EtTooManyException
- if there were more than one valid response when policy is set to
EtConstants.policyError
and we are looking either
remotely or anywhere for the ET system.public void disconnect()