use of org.iobserve.utility.tcp.events.TcpUpdateParameterEvent in project iobserve-analysis by research-iobserve.
the class ProbeMapper method createMethodsToUpdate.
private void createMethodsToUpdate(final ProbeManagementData element) throws ControlEventCreationFailedException, InvocationException, DBException {
final Map<AllocationContext, Set<OperationSignature>> methodsToUpdate = element.getMethodsToUpdate();
if (methodsToUpdate != null && element.getWhitelist() != null) {
for (final AllocationContext allocation : methodsToUpdate.keySet()) {
this.logger.debug("AllocationContext to update {}", allocation.getEntityName());
for (final OperationSignature operationSignature : methodsToUpdate.get(allocation)) {
try {
final String pattern = this.computeAllocationComponentIdentifierPattern(allocation, operationSignature);
this.logger.debug("AllocationContext update operation {} -- {}", operationSignature.getEntityName(), pattern);
final Map<String, List<String>> parameters = new HashMap<>();
parameters.put("whitelist", element.getWhitelist());
final TcpUpdateParameterEvent currentEvent = new TcpUpdateParameterEvent(pattern, element.getTriggerTime(), parameters);
this.fillTcpControlEvent(currentEvent, allocation);
this.outputPort.send(currentEvent);
} catch (final ControlEventCreationFailedException e) {
this.logger.error("Could not construct activation event for: {} {}", operationSignature.toString(), e.getLocalizedMessage());
}
}
}
}
}
Aggregations