1 package de.dlr.bt.stc.source.opcua;
2
3 import java.util.Objects;
4
5 import javax.annotation.Nullable;
6
7 import org.eclipse.milo.opcua.stack.core.security.SecurityPolicy;
8
9 import de.dlr.bt.stc.source.CredentialsCfg;
10 import lombok.EqualsAndHashCode;
11 import lombok.ToString;
12
13 @EqualsAndHashCode(onlyExplicitlyIncluded = true)
14 @ToString(onlyExplicitlyIncluded = true)
15 public class MiloClientCfg {
16 private SourceOPCUACfg sourcecfg;
17
18 public MiloClientCfg(SourceOPCUACfg sourcecfg) {
19 this.sourcecfg = Objects.requireNonNull(sourcecfg);
20 }
21
22 @Nullable
23 @ToString.Include
24 public String getEndpoint() {
25 return sourcecfg.getEndpoint();
26 }
27
28 @EqualsAndHashCode.Include
29 protected String getEndpointLC() {
30 return getEndpoint().toLowerCase();
31 }
32
33 @EqualsAndHashCode.Include
34 @Nullable
35 public CredentialsCfg getCredentials() {
36 return sourcecfg.getCredentials();
37 }
38
39 @ToString.Include
40 @EqualsAndHashCode.Include
41 public SecurityPolicy getSecurityPolicy() {
42 return sourcecfg.getSecurityPolicy();
43 }
44
45 @ToString.Include
46 @EqualsAndHashCode.Include
47 @Nullable
48 public String getKeystorePath() {
49 return sourcecfg.getKeystorePath();
50 }
51
52 @EqualsAndHashCode.Include
53 @Nullable
54 public String getKeystorePassword() {
55 return sourcecfg.getKeystorePassword();
56 }
57
58 @EqualsAndHashCode.Include
59 public boolean isCreateKeystore() {
60 return sourcecfg.isCreateKeystore();
61 }
62
63 }