Update apache camel from 2.x to 3.x
[aai/router-core.git] / src / main / java / org / onap / aai / event / EventBusProducer.java
index ec2a0da..86118ce 100644 (file)
 package org.onap.aai.event;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.impl.DefaultProducer;
+import org.apache.camel.support.DefaultProducer;
+import org.onap.aai.event.api.EventPublisher;
 
 /**
  * The EventBus producer.
  */
 public class EventBusProducer extends DefaultProducer {
-  private EventBusEndpoint endpoint;
+  private AbstractEventBusEndpoint endpoint;
+  
+  private EventPublisher publisher;
 
-  public EventBusProducer(EventBusEndpoint endpoint) {
-    super(endpoint);
-    this.endpoint = endpoint;
+  public EventBusProducer(AbstractEventBusEndpoint endpoint, EventPublisher publisher) {
+           super(endpoint);
+           this.endpoint = endpoint;
+           this.publisher = publisher;
   }
+  
   @Override
   public void process(Exchange exchange) throws Exception {
     // Publishing to event bus is currently not supported