/
OutboundSignalFactory.java
35 lines (29 loc) · 1.09 KB
/
OutboundSignalFactory.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Copyright (c) 2017-2018 Bosch Software Innovations GmbH.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/index.php
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.ditto.services.models.connectivity;
import java.util.Set;
import org.eclipse.ditto.model.connectivity.Target;
import org.eclipse.ditto.signals.base.Signal;
/**
* Creates instances of {@link OutboundSignal}.
*/
public class OutboundSignalFactory {
public static OutboundSignal newOutboundSignal(final Signal<?> signal, final Set<Target> targets) {
return new UnmappedOutboundSignal(signal, targets);
}
public static OutboundSignal newMappedOutboundSignal(final OutboundSignal signal,
final ExternalMessage externalMessage) {
return new MappedOutboundSignal(signal, externalMessage);
}
private OutboundSignalFactory() {
throw new AssertionError();
}
}