Skip to content

Package: TranslatorEventConfigurationManagementJmsKura

TranslatorEventConfigurationManagementJmsKura

nameinstructionbranchcomplexitylinemethod
TranslatorEventConfigurationManagementJmsKura()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
createChannel(String, String, String)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createMessage(KuraConfigurationEventChannel, Date, KuraConfigurationEventPayload)
M: 7 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
createPayload()
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2016, 2022 Eurotech and/or its affiliates and others
3: *
4: * This program and the accompanying materials are made
5: * available under the terms of the Eclipse Public License 2.0
6: * which is available at https://www.eclipse.org/legal/epl-2.0/
7: *
8: * SPDX-License-Identifier: EPL-2.0
9: *
10: * Contributors:
11: * Eurotech - initial API and implementation
12: *******************************************************************************/
13: package org.eclipse.kapua.translator.jms.kura.event;
14:
15: import org.eclipse.kapua.service.device.call.message.kura.event.configuration.KuraConfigurationEventChannel;
16: import org.eclipse.kapua.service.device.call.message.kura.event.configuration.KuraConfigurationEventMessage;
17: import org.eclipse.kapua.service.device.call.message.kura.event.configuration.KuraConfigurationEventPayload;
18: import org.eclipse.kapua.translator.Translator;
19: import org.eclipse.kapua.transport.message.jms.JmsMessage;
20:
21: import java.util.Date;
22:
23: /**
24: * {@link Translator} implementation from {@link JmsMessage} to {@link KuraConfigurationEventMessage}
25: *
26: * @since 2.0.0
27: */
28: public class TranslatorEventConfigurationManagementJmsKura extends AbstractTranslatorEventJmsKura<KuraConfigurationEventChannel, KuraConfigurationEventPayload, KuraConfigurationEventMessage> {
29:
30: /**
31: * Constructor.
32: *
33: * @since 2.0.0
34: */
35: public TranslatorEventConfigurationManagementJmsKura() {
36: super(KuraConfigurationEventMessage.class);
37: }
38:
39: @Override
40: public KuraConfigurationEventMessage createMessage(KuraConfigurationEventChannel deviceChannel, Date receivedOn, KuraConfigurationEventPayload devicePayload) {
41: return new KuraConfigurationEventMessage(deviceChannel, receivedOn, devicePayload);
42: }
43:
44: @Override
45: public KuraConfigurationEventPayload createPayload() {
46: return new KuraConfigurationEventPayload();
47: }
48:
49: @Override
50: public KuraConfigurationEventChannel createChannel(String messageClassifier, String scopeName, String clientId) {
51: return new KuraConfigurationEventChannel(messageClassifier, scopeName, clientId);
52: }
53: }