Skip to content

Commit 1fbd155

Browse files
committed
Renaming Callback to Callbacks
1 parent 0a8cd32 commit 1fbd155

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/OpampClient.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ public interface OpampClient {
1313
/**
1414
* Starts the client and begin attempts to connect to the Server. Once connection is established
1515
* the client will attempt to maintain it by reconnecting if the connection is lost. All failed
16-
* connection attempts will be reported via {@link Callback#onConnectFailed(OpampClient,
16+
* connection attempts will be reported via {@link Callbacks#onConnectFailed(OpampClient,
1717
* Throwable)} callback.
1818
*
1919
* <p>This method does not wait until the connection to the Server is established and will likely
2020
* return before the connection attempts are even made.
2121
*
2222
* <p>This method may be called only once.
2323
*
24-
* @param callback The Callback to which the Client will notify about any Server requests and
24+
* @param callbacks The Callback to which the Client will notify about any Server requests and
2525
* responses.
2626
*/
27-
void start(Callback callback);
27+
void start(Callbacks callbacks);
2828

2929
/**
30-
* Stops the client. May be called only after {@link #start(OpampClient.Callback)}. May be called
30+
* Stops the client. May be called only after {@link #start(Callbacks)}. May be called
3131
* only once. After this call returns successfully it is guaranteed that no callbacks will be
3232
* called. Once stopped, the client cannot be started again.
3333
*/
@@ -47,10 +47,10 @@ public interface OpampClient {
4747
*/
4848
void setEffectiveConfig(Opamp.EffectiveConfig effectiveConfig);
4949

50-
interface Callback {
50+
interface Callbacks {
5151
/**
5252
* Called when the connection is successfully established to the Server. May be called after
53-
* {@link #start(OpampClient.Callback)} is called and every time a connection is established to
53+
* {@link #start(Callbacks)} is called and every time a connection is established to
5454
* the Server. For WebSocket clients this is called after the handshake is completed without any
5555
* error. For HTTP clients this is called for any request if the response status is OK.
5656
*
@@ -60,7 +60,7 @@ interface Callback {
6060

6161
/**
6262
* Called when the connection to the Server cannot be established. May be called after {@link
63-
* #start(OpampClient.Callback)} is called and tries to connect to the Server. May also be
63+
* #start(Callbacks)} is called and tries to connect to the Server. May also be
6464
* called if the connection is lost and reconnection attempt fails.
6565
*
6666
* @param client The relevant {@link OpampClient} instance.

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/response/MessageData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import opamp.proto.Opamp;
1212

1313
/**
14-
* Data class provided in {@link OpampClient.Callback#onMessage(OpampClient, MessageData)} with
14+
* Data class provided in {@link OpampClient.Callbacks#onMessage(OpampClient, MessageData)} with
1515
* Server's provided status changes.
1616
*/
1717
@AutoValue

0 commit comments

Comments
 (0)