public abstract class AbstractEvaluationModule extends AbstractPlatformConnectorComponent
| Modifier and Type | Field and Description |
|---|---|
protected com.rabbitmq.client.QueueingConsumer |
consumer
Consumer used to receive the responses from the evaluation storage.
|
protected RabbitQueue |
evalModule2EvalStoreQueue
Queue to the evaluation storage.
|
protected RabbitQueue |
evalStore2EvalModuleQueue
Incoming queue from the evaluation storage.
|
protected String |
experimentUri
The URI of the experiment.
|
private static org.slf4j.Logger |
LOGGER |
cmdChannel, cmdQueueFactory, DEFAULT_CMD_RESPONSE_TIMEOUT, defaultContainerTypeconnectionFactory, incomingDataQueueFactory, NUMBER_OF_RETRIES_TO_CONNECT_TO_RABBIT_MQ, outgoingDataQueuefactory, rabbitMQHostName, START_WAITING_TIME_BEFORE_RETRY| Constructor and Description |
|---|
AbstractEvaluationModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
collectResponses()
This method communicates with the evaluation storage to collect all
response pairs.
|
protected org.apache.jena.rdf.model.Model |
createDefaultModel() |
protected abstract void |
evaluateResponse(byte[] expectedData,
byte[] receivedData,
long taskSentTimestamp,
long responseReceivedTimestamp)
Evaluates the given response pair.
|
void |
init()
This method initializes the component.
|
void |
receiveCommand(byte command,
byte[] data)
This method is called if a command is received and might be interesting
for this particular component.
|
void |
run()
This method executes the component.
|
private void |
sendResultModel(org.apache.jena.rdf.model.Model model)
Sends the model to the benchmark controller.
|
protected abstract org.apache.jena.rdf.model.Model |
summarizeEvaluation()
Summarizes the evaluation and generates an RDF model containing the
evaluation results.
|
addContainerObserver, createContainer, getFactoryForIncomingCmdQueues, getFactoryForIncomingDataQueues, getFactoryForOutgoingCmdQueues, getFactoryForOutgoingDataQueues, stopContaineraddCommandHeaderId, createContainer, createContainer, handleCmd, sendToCmdQueue, sendToCmdQueue, sendToCmdQueuecreateConnection, generateSessionQueueName, getHobbitSessionIdprivate static final org.slf4j.Logger LOGGER
protected com.rabbitmq.client.QueueingConsumer consumer
protected RabbitQueue evalModule2EvalStoreQueue
protected RabbitQueue evalStore2EvalModuleQueue
protected String experimentUri
public void init()
throws Exception
Componentinit in interface Componentinit in class AbstractCommandReceivingComponentException - if an error occurs during the initializationpublic void run()
throws Exception
ComponentException - if an error occurs during the executionprotected void collectResponses()
throws Exception
evaluateResponse(byte[], byte[], long, long) method is called.Exception - if a communication error occurs.protected abstract void evaluateResponse(byte[] expectedData,
byte[] receivedData,
long taskSentTimestamp,
long responseReceivedTimestamp)
throws Exception
expectedData - the data that has been expectedreceivedData - the data that has been received from the systemtaskSentTimestamp - the time at which the task has been sent to the systemresponseReceivedTimestamp - the time at which the response has been received from the
systemException - if an error occurs during the evaluationprotected abstract org.apache.jena.rdf.model.Model summarizeEvaluation()
throws Exception
Exception - if a sever error occursprivate void sendResultModel(org.apache.jena.rdf.model.Model model)
throws IOException
model - the model that should be sentIOException - if an error occurs during the commmunicationpublic void receiveCommand(byte command,
byte[] data)
CommandReceivingComponentreceiveCommand in interface CommandReceivingComponentreceiveCommand in class AbstractPlatformConnectorComponentcommand - the byte encoding the commanddata - additional data that was sent together with the commandpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class AbstractCommandReceivingComponentIOExceptionprotected org.apache.jena.rdf.model.Model createDefaultModel()
Copyright © 2017–2018. All rights reserved.