Search in sources :

Example 1 with Privacy_EJBDeployedEvent

use of org.iobserve.common.record.Privacy_EJBDeployedEvent in project iobserve-analysis by research-iobserve.

the class DeployPCMMapper method ejbMapper.

private void ejbMapper(final EJBDeployedEvent event) {
    final String service = event.getService();
    final String context = event.getContext();
    // build the url for the containerAllocationEvent
    final String urlContext = context.replaceAll("\\.", "/");
    final String url = "http://" + service + '/' + urlContext;
    final Correspondent correspondent = this.correspondence.getCorrespondent(context).get();
    if (correspondent != null) {
        if (event instanceof Privacy_EJBDeployedEvent) {
            this.outputPort.send(new PCMDeployedEvent(service, correspondent, url, ((Privacy_EJBDeployedEvent) event).getCountryCode()));
        } else {
            this.outputPort.send(new PCMDeployedEvent(service, correspondent, url, (short) 0));
        }
    } else {
        DeployPCMMapper.LOGGER.warn("No correspondent found for {}.", service);
    }
}
Also used : PCMDeployedEvent(org.iobserve.analysis.deployment.data.PCMDeployedEvent) Correspondent(org.iobserve.model.correspondence.Correspondent) Privacy_EJBDeployedEvent(org.iobserve.common.record.Privacy_EJBDeployedEvent)

Aggregations

PCMDeployedEvent (org.iobserve.analysis.deployment.data.PCMDeployedEvent)1 Privacy_EJBDeployedEvent (org.iobserve.common.record.Privacy_EJBDeployedEvent)1 Correspondent (org.iobserve.model.correspondence.Correspondent)1