summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java10
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java16
2 files changed, 10 insertions, 16 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
index 06c3d4163..e12633555 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/ApexPluginsEventProducer.java
@@ -20,18 +20,18 @@
package org.onap.policy.apex.service.engine.event;
-import org.onap.policy.apex.core.infrastructure.threading.ApplicationThreadFactory;
-import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
-
import java.util.EnumMap;
import java.util.Map;
import java.util.Properties;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
+
public abstract class ApexPluginsEventProducer implements ApexEventProducer {
// The name for this producer
protected String name = null;
// The peer references for this event handler
- protected Map<EventHandlerPeeredMode, PeeredReference> peerReferenceMap = new EnumMap<>(EventHandlerPeeredMode.class);
+ protected Map<EventHandlerPeeredMode, PeeredReference> peerReferenceMap =
+ new EnumMap<>(EventHandlerPeeredMode.class);
/**
* {@inheritDoc}.
@@ -62,7 +62,7 @@ public abstract class ApexPluginsEventProducer implements ApexEventProducer {
*/
@Override
public void sendEvent(final long executionId, final Properties executionProperties, final String eventName,
- final Object event) {
+ final Object event) {
// Check if this is a synchronized event, if so we have received a reply
final SynchronousEventCache synchronousEventCache =
(SynchronousEventCache) peerReferenceMap.get(EventHandlerPeeredMode.SYNCHRONOUS);
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
index 8f21a4fb9..b0dac3372 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/producer/ApexFileEventProducer.java
@@ -24,19 +24,14 @@ package org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.produce
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
-import java.util.EnumMap;
-import java.util.Map;
import java.util.Properties;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
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.ApexEventRuntimeException;
-import org.onap.policy.apex.service.engine.event.PeeredReference;
-import org.onap.policy.apex.service.engine.event.SynchronousEventCache;
+import org.onap.policy.apex.service.engine.event.ApexPluginsEventProducer;
import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FileCarrierTechnologyParameters;
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;
@@ -56,7 +51,8 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
* {@inheritDoc}.
*/
@Override
- public void init(final String producerName, final EventHandlerParameters producerParameters) throws ApexEventException {
+ public void init(final String producerName, final EventHandlerParameters producerParameters)
+ throws ApexEventException {
this.name = producerName;
// Get and check the Apex parameters from the parameter service
@@ -89,7 +85,6 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
} catch (final IOException e) {
final String errorMessage = "ApexFileProducer \"" + producerName + "\" failed to open file for writing: \""
+ fileCarrierTechnologyParameters.getFileName() + "\"";
- LOGGER.warn(errorMessage, e);
throw new ApexEventException(errorMessage, e);
}
@@ -112,9 +107,8 @@ public class ApexFileEventProducer extends ApexPluginsEventProducer {
try {
stringEvent = (String) event;
} catch (final Exception e) {
- final String errorMessage = "error in ApexFileProducer \"" + name + "\" while transferring event \""
- + event + "\" to the output stream";
- LOGGER.debug(errorMessage, e);
+ final String errorMessage = "error in ApexFileProducer \"" + name + "\" while transferring event \"" + event
+ + "\" to the output stream";
throw new ApexEventRuntimeException(errorMessage, e);
}