use of org.iobserve.utility.tcp.events.TcpDeactivationControlEvent in project iobserve-analysis by research-iobserve.
the class ProbeMapper method createMethodsToDeactivate.
private void createMethodsToDeactivate(final ProbeManagementData element) throws ControlEventCreationFailedException, InvocationException, DBException {
final Map<AllocationContext, Set<OperationSignature>> methodsToDeactivate = element.getMethodsToDeactivate();
if (methodsToDeactivate != null) {
this.logger.debug("methods to deactivate");
for (final AllocationContext allocation : methodsToDeactivate.keySet()) {
this.logger.debug("AllocationContext to deactivate {}", allocation.getEntityName());
for (final OperationSignature operationSignature : methodsToDeactivate.get(allocation)) {
try {
final String pattern = this.computeAllocationComponentIdentifierPattern(allocation, operationSignature);
this.logger.debug("AllocationContext deactivate operation {} -- {}", operationSignature.getEntityName(), pattern);
// deactivation -> no parameters needed
final TcpDeactivationControlEvent currentEvent = new TcpDeactivationControlEvent(pattern, element.getTriggerTime());
this.fillTcpControlEvent(currentEvent, allocation);
this.outputPort.send(currentEvent);
} catch (final ControlEventCreationFailedException e) {
this.logger.error("Could not construct deactivation event for: " + operationSignature.toString(), e);
}
}
}
}
}
Aggregations