Skip to content

Package: KapuaChannel

KapuaChannel

nameinstructionbranchcomplexitylinemethod
toPathString()
M: 5 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: * Red Hat Inc
13: *******************************************************************************/
14: package org.eclipse.kapua.message;
15:
16: import org.eclipse.kapua.message.xml.MessageXmlRegistry;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlRootElement;
21: import javax.xml.bind.annotation.XmlType;
22: import java.util.List;
23:
24: /**
25: * {@link KapuaChannel} definition.
26: *
27: * @since 1.0.0
28: */
29: @XmlRootElement(name = "channel")
30: @XmlAccessorType(XmlAccessType.PROPERTY)
31: @XmlType(propOrder = {"semanticParts"}, factoryClass = MessageXmlRegistry.class, factoryMethod = "newKapuaChannel")
32: public interface KapuaChannel extends Channel {
33:
34: /**
35: * Get the channel destination semantic part
36: *
37: * @return
38: * @since 1.0.0
39: */
40: List<String> getSemanticParts();
41:
42: /**
43: * Set the channel destination semantic part
44: *
45: * @param semanticParts
46: * @since 1.0.0
47: */
48: void setSemanticParts(List<String> semanticParts);
49:
50: /**
51: * @return
52: * @since 1.0.0
53: */
54: default String toPathString() {
55: return String.join("/", getSemanticParts());
56: }
57: }