aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/plugins-event')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaProducer.java9
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java8
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java9
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducer.java9
4 files changed, 8 insertions, 27 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaProducer.java
index bb5398ceb..95cf4ad8b 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaProducer.java
@@ -21,8 +21,6 @@
package org.onap.policy.apex.plugins.event.carrier.kafka;
-import java.util.EnumMap;
-import java.util.Map;
import java.util.Properties;
import org.apache.kafka.clients.producer.KafkaProducer;
@@ -30,10 +28,7 @@ import org.apache.kafka.clients.producer.Producer;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexPluginsEventProducer;
-import org.onap.policy.apex.service.engine.event.PeeredReference;
-import org.onap.policy.apex.service.engine.event.SynchronousEventCache;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
-import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -81,8 +76,8 @@ public class ApexKafkaProducer extends ApexPluginsEventProducer {
// Kick off the Kafka producer
kafkaProducer = new KafkaProducer<>(kafkaProducerProperties.getKafkaProducerProperties());
if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("event producer " + this.name + " is ready to send to topics: "
- + kafkaProducerProperties.getProducerTopic());
+ LOGGER.debug("event producer {} is ready to send to topics: {}", this.name,
+ kafkaProducerProperties.getProducerTopic());
}
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
index 3341082c0..1bfa9d778 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientConusmerTest.java
@@ -216,7 +216,7 @@ public class ApexRestClientConusmerTest {
// We have not set the URL, this test should not receive any events
arcc.start();
await().atMost(400, TimeUnit.MILLISECONDS).until(() -> outContent.toString()
- .contains("received an empty event from URL \"http://some.place.that.does.not/exist\""));
+ .contains("received an empty event from URL \"http://some.place.that.does.not/exist\""));
arcc.stop();
assertEquals(0, incomingEventReceiver.getEventCount());
}
@@ -259,7 +259,7 @@ public class ApexRestClientConusmerTest {
// We have not set the URL, this test should not receive any events
arcc.start();
await().atMost(200, TimeUnit.MILLISECONDS).until(() -> outContent.toString()
- .contains("received an empty event from URL \"http://some.place.that.does.not/exist\""));
+ .contains("received an empty event from URL \"http://some.place.that.does.not/exist\""));
arcc.stop();
assertEquals(0, incomingEventReceiver.getEventCount());
@@ -303,8 +303,8 @@ public class ApexRestClientConusmerTest {
// We have not set the URL, this test should not receive any events
arcc.start();
- await().atMost(400, TimeUnit.MILLISECONDS).until(
- () -> incomingEventReceiver.getLastEvent().equals("This is an event"));
+ await().atMost(400, TimeUnit.MILLISECONDS)
+ .until(() -> incomingEventReceiver.getLastEvent().equals("This is an event"));
arcc.stop();
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
index ce688d62d..4ab65d927 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/java/org/onap/policy/apex/plugins/event/carrier/restclient/ApexRestClientProducerTest.java
@@ -42,18 +42,12 @@ import org.onap.policy.apex.service.engine.event.SynchronousEventCache;
import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.ApexFileEventConsumer;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import ch.qos.logback.classic.Level;
/**
* Test the ApexRestClientProducer class.
*
*/
public class ApexRestClientProducerTest {
- private static final Logger LOGGER = LoggerFactory.getLogger(ApexRestClientProducer.class);
-
@Mock
private Client httpClientMock;
@@ -257,9 +251,6 @@ public class ApexRestClientProducerTest {
public void testApexRestClientProducerPostEventCacheTrace() throws ApexEventException {
MockitoAnnotations.initMocks(this);
- ch.qos.logback.classic.Logger classicLogger = (ch.qos.logback.classic.Logger) LOGGER;
- classicLogger.setLevel(Level.TRACE);
-
ApexRestClientProducer arcp = new ApexRestClientProducer();
assertNotNull(arcp);
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducer.java
index 422c91bc3..663ab8f7f 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketProducer.java
@@ -21,8 +21,6 @@
package org.onap.policy.apex.plugins.event.carrier.websocket;
-import java.util.EnumMap;
-import java.util.Map;
import java.util.Properties;
import org.onap.policy.apex.core.infrastructure.messaging.MessagingException;
@@ -32,10 +30,7 @@ import org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStri
import org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessager;
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexPluginsEventProducer;
-import org.onap.policy.apex.service.engine.event.PeeredReference;
-import org.onap.policy.apex.service.engine.event.SynchronousEventCache;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
-import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,7 +39,7 @@ import org.slf4j.LoggerFactory;
*
* @author Liam Fallon (liam.fallon@ericsson.com)
*/
-public class ApexWebSocketProducer extends ApexPluginsEventProducer implements WsStringMessageListener {
+public class ApexWebSocketProducer extends ApexPluginsEventProducer implements WsStringMessageListener {
// Get a reference to the logger
private static final Logger LOGGER = LoggerFactory.getLogger(ApexWebSocketProducer.class);
@@ -91,7 +86,7 @@ public class ApexWebSocketProducer extends ApexPluginsEventProducer implements
@Override
public void sendEvent(final long executionId, final Properties executionProperties, final String eventName,
final Object event) {
- super.sendEvent(executionId, executionProperties, eventName, event );
+ super.sendEvent(executionId, executionProperties, eventName, event);
wsStringMessager.sendString((String) event);
}