Update apache camel from 2.x to 3.x
[aai/router-core.git] / src / main / java / org / onap / aai / event / EventBusProducer.java
index 50f6d96..86118ce 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START=======================================================
  * org.onap.aai
  * ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  */
 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