use of org.iobserve.common.record.Privacy in project iobserve-analysis by research-iobserve.
the class DeployPCMMapperStage method execute.
@Override
protected void execute(final IDeployedEvent event) throws InvocationException, DBException {
// ExperimentLoggingUtils.measureDeploymentEvent(event, ObservationPoint.CODE_TO_MODEL_ENTRY);
this.logger.debug("Received deployment event {}", event);
final ISOCountryCode countryCode;
if (event instanceof Privacy) {
countryCode = ((Privacy) event).getCountryCode();
} else {
countryCode = ISOCountryCode.EVIL_EMPIRE;
}
if (event instanceof ServletDeployedEvent) {
final ServletDeployedEvent servletEvent = (ServletDeployedEvent) event;
final String service = servletEvent.getService();
final String context = servletEvent.getContext();
this.performMapping(EServiceTechnology.SERVLET, service, context, countryCode, event.getTimestamp());
} else if (event instanceof EJBDeployedEvent) {
final EJBDeployedEvent ejbEvent = (EJBDeployedEvent) event;
final String service = ejbEvent.getService();
final String context = ejbEvent.getContext();
this.performMapping(EServiceTechnology.EJB, service, context, countryCode, event.getTimestamp());
} else {
throw new InternalError("Deployment event type " + event.getClass().getCanonicalName() + " not supported.");
}
// ExperimentLoggingUtils.measureDeploymentEvent(event, ObservationPoint.CODE_TO_MODEL_EXIT);
}
Aggregations