@@ -20,8 +20,7 @@ static OpampClientBuilder builder() {
2020 /**
2121 * Starts the client and begin attempts to connect to the Server. Once connection is established
2222 * the client will attempt to maintain it by reconnecting if the connection is lost. All failed
23- * connection attempts will be reported via {@link Callbacks#onConnectFailed(OpampClient,
24- * Throwable)} callback.
23+ * connection attempts will be reported via {@link Callbacks#onConnectFailed(Throwable)} callback.
2524 *
2625 * <p>This method does not wait until the connection to the Server is established and will likely
2726 * return before the connection attempts are even made.
@@ -45,7 +44,7 @@ static OpampClientBuilder builder() {
4544 * the Server. When called after {@link #start(Callbacks)}, the attributes will be included in the
4645 * next outgoing status report. This is typically used by Agents which allow their
4746 * AgentDescription to change dynamically while the OpAMPClient is started. May be also called
48- * from {@link Callbacks#onMessage(OpampClient, MessageData)}.
47+ * from {@link Callbacks#onMessage(MessageData)}.
4948 *
5049 * @param agentDescription The new agent description.
5150 */
@@ -64,31 +63,27 @@ interface Callbacks {
6463 * {@link #start(Callbacks)} is called and every time a connection is established to the Server.
6564 * For WebSocket clients this is called after the handshake is completed without any error. For
6665 * HTTP clients this is called for any request if the response status is OK.
67- *
68- * @param client The relevant {@link OpampClient} instance.
6966 */
70- void onConnect (OpampClient client );
67+ void onConnect ();
7168
7269 /**
7370 * Called when the connection to the Server cannot be established. May be called after {@link
7471 * #start(Callbacks)} is called and tries to connect to the Server. May also be called if the
7572 * connection is lost and reconnection attempt fails.
7673 *
77- * @param client The relevant {@link OpampClient} instance.
7874 * @param throwable The exception.
7975 */
80- void onConnectFailed (OpampClient client , @ Nullable Throwable throwable );
76+ void onConnectFailed (@ Nullable Throwable throwable );
8177
8278 /**
8379 * Called when the Server reports an error in response to some previously sent request. Useful
8480 * for logging purposes. The Agent should not attempt to process the error by reconnecting or
8581 * retrying previous operations. The client handles the ErrorResponse_UNAVAILABLE case
8682 * internally by performing retries as necessary.
8783 *
88- * @param client The relevant {@link OpampClient} instance.
8984 * @param errorResponse The error returned by the Server.
9085 */
91- void onErrorResponse (OpampClient client , ServerErrorResponse errorResponse );
86+ void onErrorResponse (ServerErrorResponse errorResponse );
9287
9388 /**
9489 * Called when the Agent receives a message that needs processing. See {@link MessageData}
@@ -99,9 +94,8 @@ interface Callbacks {
9994 * onMessage returns. This is advisable if processing can take a long time. In that case
10095 * returning quickly is preferable to avoid blocking the {@link OpampClient}.
10196 *
102- * @param client The relevant {@link OpampClient} instance.
10397 * @param messageData The server response data that needs processing.
10498 */
105- void onMessage (OpampClient client , MessageData messageData );
99+ void onMessage (MessageData messageData );
106100 }
107101}
0 commit comments