001/*- 002 * #%L 003 * Smile CDR - CDR 004 * %% 005 * Copyright (C) 2016 - 2025 Smile CDR, Inc. 006 * %% 007 * All rights reserved. 008 * #L% 009 */ 010package ca.cdr.api.model.json; 011 012import org.apache.camel.ExchangePropertyKey; 013 014import java.util.EnumMap; 015import java.util.Map; 016 017public class CamelEventJson extends AbstractModelJson { 018 public String routeId; 019 public String type; 020 public String fromEndpointUri; 021 public String toEndpointUri; 022 public Map<ExchangePropertyKey, Object> properties; 023 public String exceptionMessage; 024 025 public CamelEventJson() {} 026 027 public <T> void addProperty(ExchangePropertyKey theExchangePropertyKey, T theValue) { 028 if (properties == null) { 029 properties = new EnumMap<>(ExchangePropertyKey.class); 030 } 031 properties.put(theExchangePropertyKey, theValue); 032 } 033}