public class SM_Data extends SM_Service
CM_Data
class.Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,DataTransfer> |
dataQueue
Data list sent from other services.
|
cm, commID
passwordHandler, service, serviceType
jarFile, syncOn, uuid
Constructor and Description |
---|
SM_Data(Service service,
PasswordHandler pHandler)
Creates a new instance of SM_Data.
|
Modifier and Type | Method and Description |
---|---|
void |
dataFromService(java.lang.String serviceUuid,
java.lang.String serviceType,
org.licas_xml.abs.Element dataInfo)
This method can receive a data result as an XML-based description and store it in
an indexed table.
|
void |
dataToService(java.lang.String serviceType,
org.licas_xml.abs.Element dataXml)
This can be used to send data to some service using an XML-based description.
|
java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> |
getAllData()
Retrieve and store all data from a list of running services.
|
java.util.HashMap<java.lang.String,DataTransfer> |
getDataQueue()
Get the current data queue.
|
org.ai_heuristic.eval.metric.MetricDataset |
getDataRandomID()
Randomly retrieve the next dataset for evaluation.
|
java.util.ArrayList<java.lang.String> |
getServiceIDs()
Get the current list of active service IDs.
|
void |
resetValues()
Reset variables for another test run.
|
void |
setAllData(java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> thisAllData)
Set the dataset for processing.
|
getCommID, getServerPassword, setCommID, setControlModule, setDataModule
canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType
getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getUUID, setJarFile, setUUID
protected java.util.HashMap<java.lang.String,DataTransfer> dataQueue
public SM_Data(Service service, PasswordHandler pHandler) throws java.lang.Exception
service
- the parent service.pHandler
- the parent password handler.java.lang.Exception
- any error.public void resetValues()
public void dataToService(java.lang.String serviceType, org.licas_xml.abs.Element dataXml) throws PasswordException, MethodNotFoundException, java.lang.Exception
serviceType
- the service type to receive the data, typically only one service of the type.dataXml
- full xml-based description of the data.PasswordException
- incorrect password for the server or mediator service.MethodNotFoundException
- the mediator does not have the calling method.java.lang.Exception
- any other error.public void dataFromService(java.lang.String serviceUuid, java.lang.String serviceType, org.licas_xml.abs.Element dataInfo) throws java.lang.Exception
serviceUuid
- the unique id of the service that sent the data, for indexing purposes.serviceType
- service type of the service that sent the data, for indexing purposes.dataInfo
- full xml-based description of the data.java.lang.Exception
- any error.public java.util.ArrayList<java.lang.String> getServiceIDs() throws java.lang.Exception
java.lang.Exception
- any error.public void setAllData(java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> thisAllData)
thisAllData
- the whole dataset.public java.util.HashMap<java.lang.String,org.ai_heuristic.eval.metric.MetricDataset> getAllData() throws ServiceException, java.lang.Exception
ServiceException
- probably for password or service not found.java.lang.Exception
- and error.public org.ai_heuristic.eval.metric.MetricDataset getDataRandomID() throws java.lang.Exception
resetServiceIDs
to reset to the full list of other services again.
This version calls getValue
that uses the EvaluateBase.valueFromString
method to try to parse a string-based representation of a value into a Java object,
which will only automatically work for simple types, or XML.java.lang.Exception
- and error.public java.util.HashMap<java.lang.String,DataTransfer> getDataQueue()