File tree 2 files changed +31
-14
lines changed
server/src/main/java/org/opensearch/plugins
2 files changed +31
-14
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * The OpenSearch Contributors require contributions made to
5
+ * this file be licensed under the Apache-2.0 license or a
6
+ * compatible open source license.
7
+ */
8
+
9
+ package org .opensearch .plugins ;
10
+
11
+ import org .opensearch .common .network .NetworkModule ;
12
+ import org .opensearch .common .settings .Settings ;
13
+
14
+ /**
15
+ * Default implementation of {@link SecureTransportSettingsProvider.SecureTransportParameters}.
16
+ */
17
+ class DefaultSecureTransportParameters implements SecureTransportSettingsProvider .SecureTransportParameters {
18
+ private final Settings settings ;
19
+
20
+ DefaultSecureTransportParameters (Settings settings ) {
21
+ this .settings = settings ;
22
+ }
23
+
24
+ @ Override
25
+ public boolean dualModeEnabled () {
26
+ return NetworkModule .TRANSPORT_SSL_DUAL_MODE_ENABLED .get (settings );
27
+ }
28
+ }
Original file line number Diff line number Diff line change 9
9
package org .opensearch .plugins ;
10
10
11
11
import org .opensearch .common .annotation .ExperimentalApi ;
12
- import org .opensearch .common .network .NetworkModule ;
13
12
import org .opensearch .common .settings .Settings ;
14
13
import org .opensearch .transport .Transport ;
15
14
import org .opensearch .transport .TransportAdapterProvider ;
@@ -47,24 +46,14 @@ default Optional<SecureTransportParameters> parameters(Settings settings) {
47
46
return Optional .of (new DefaultSecureTransportParameters (settings ));
48
47
}
49
48
49
+ /**
50
+ * Dynamic parameters that can be provided by the {@link SecureTransportSettingsProvider}
51
+ */
50
52
@ ExperimentalApi
51
53
interface SecureTransportParameters {
52
54
boolean dualModeEnabled ();
53
55
}
54
56
55
- class DefaultSecureTransportParameters implements SecureTransportParameters {
56
- private final Settings settings ;
57
-
58
- DefaultSecureTransportParameters (Settings settings ) {
59
- this .settings = settings ;
60
- }
61
-
62
- @ Override
63
- public boolean dualModeEnabled () {
64
- return NetworkModule .TRANSPORT_SSL_DUAL_MODE_ENABLED .get (settings );
65
- }
66
- }
67
-
68
57
/**
69
58
* If supported, builds the {@link TransportExceptionHandler} instance for {@link Transport} instance
70
59
* @param settings settings
You can’t perform that action at this time.
0 commit comments