Search in sources :

Example 1 with Privacy

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);
}
Also used : Privacy(org.iobserve.common.record.Privacy) ISOCountryCode(org.iobserve.common.record.ISOCountryCode) EJBDeployedEvent(org.iobserve.common.record.EJBDeployedEvent) ServletDeployedEvent(org.iobserve.common.record.ServletDeployedEvent)

Aggregations

EJBDeployedEvent (org.iobserve.common.record.EJBDeployedEvent)1 ISOCountryCode (org.iobserve.common.record.ISOCountryCode)1 Privacy (org.iobserve.common.record.Privacy)1 ServletDeployedEvent (org.iobserve.common.record.ServletDeployedEvent)1