* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 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.CamelContext;
-import org.apache.camel.Endpoint;
-import org.apache.camel.impl.UriEndpointComponent;
-
import java.util.Map;
-/**
- * Represents the component that manages {@link EventBusEndpoint}.
- */
-public class EventBusComponent extends UriEndpointComponent {
-
- public EventBusComponent() {
- super(EventBusEndpoint.class);
- }
-
- public EventBusComponent(CamelContext context) {
- super(context, EventBusEndpoint.class);
- }
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.spi.annotations.Component;
- @Override
- protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters)
- throws Exception {
- Endpoint endpoint = new EventBusEndpoint(uri, this);
- setProperties(endpoint, parameters);
- return endpoint;
- }
+@Component("event-bus")
+public class EventBusComponent extends DefaultComponent {
+ public EventBusComponent() {
+ super();
+ }
+ public EventBusComponent(CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+ Endpoint endpoint = new EventBusEndPoint(uri, this);
+ setProperties(endpoint, parameters);
+ return endpoint;
+ }
}