Skip to content

Commit 8ad2554

Browse files
authored
Create OptionChangeListener.java
1 parent ed8209d commit 8ad2554

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.instrumentation.api.incubator.config;
7+
8+
import javax.annotation.Nullable;
9+
10+
/**
11+
* Listener interface for option value changes.
12+
*
13+
* <p>This class is internal and is hence not for public use. Its APIs are unstable and can change at
14+
* any time.
15+
*/
16+
public interface OptionChangeListener {
17+
18+
/**
19+
* Called when the value of an option changes.
20+
*
21+
* @param key the option key
22+
* @param newValue the new value, or {@code null} if the option was removed
23+
* @param oldValue the previous value, or {@code null} if the option was not set
24+
*/
25+
void onOptionChanged(String key, @Nullable String newValue, @Nullable String oldValue);
26+
}

0 commit comments

Comments
 (0)