Skip to content

Package: TranslatorLifeAppsJmsKura

TranslatorLifeAppsJmsKura

nameinstructionbranchcomplexitylinemethod
TranslatorLifeAppsJmsKura()
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%
createLifecycleChannel(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%
createLifecycleMessage(KuraAppsChannel, Date, KuraAppsPayload)
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%
createLifecyclePayload()
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, 2020 Eurotech and/or its affiliates and others
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License v1.0
6: * which accompanies this distribution, and is available at
7: * http://www.eclipse.org/legal/epl-v10.html
8: *
9: * Contributors:
10: * Eurotech - initial API and implementation
11: *******************************************************************************/
12: package org.eclipse.kapua.translator.jms.kura;
13:
14: import org.eclipse.kapua.service.device.call.message.kura.lifecycle.KuraAppsChannel;
15: import org.eclipse.kapua.service.device.call.message.kura.lifecycle.KuraAppsMessage;
16: import org.eclipse.kapua.service.device.call.message.kura.lifecycle.KuraAppsPayload;
17: import org.eclipse.kapua.translator.Translator;
18: import org.eclipse.kapua.transport.message.jms.JmsMessage;
19:
20: import java.util.Date;
21:
22: /**
23: * {@link Translator} implementation from {@link JmsMessage} to {@link KuraAppsMessage}
24: *
25: * @since 1.0.0
26: */
27: public class TranslatorLifeAppsJmsKura extends AbstractTranslatorLifecycleJmsKura<KuraAppsChannel, KuraAppsPayload, KuraAppsMessage> {
28:
29: public TranslatorLifeAppsJmsKura() {
30: super(KuraAppsMessage.class);
31: }
32:
33: @Override
34: public KuraAppsMessage createLifecycleMessage(KuraAppsChannel kuraAppsChannel, Date receivedOn, KuraAppsPayload kuraAppsPayload) {
35: return new KuraAppsMessage(kuraAppsChannel, receivedOn, kuraAppsPayload);
36: }
37:
38: @Override
39: public KuraAppsPayload createLifecyclePayload() {
40: return new KuraAppsPayload();
41: }
42:
43: @Override
44: public KuraAppsChannel createLifecycleChannel(String messageClassifier, String scopeName, String clientId) {
45: return new KuraAppsChannel(messageClassifier, scopeName, clientId);
46: }
47: }