|
6 | 6 | package io.opentelemetry.opamp.client.internal; |
7 | 7 |
|
8 | 8 | import io.opentelemetry.opamp.client.internal.response.MessageData; |
9 | | -import opamp.proto.Opamp; |
| 9 | +import opamp.proto.AgentDescription; |
| 10 | +import opamp.proto.RemoteConfigStatus; |
| 11 | +import opamp.proto.ServerErrorResponse; |
10 | 12 |
|
11 | 13 | public interface OpampClient { |
12 | 14 |
|
@@ -42,14 +44,14 @@ public interface OpampClient { |
42 | 44 | * |
43 | 45 | * @param agentDescription The new agent description. |
44 | 46 | */ |
45 | | - void setAgentDescription(Opamp.AgentDescription agentDescription); |
| 47 | + void setAgentDescription(AgentDescription agentDescription); |
46 | 48 |
|
47 | 49 | /** |
48 | 50 | * Sets the current remote config status which will be sent in the next agent to server request. |
49 | 51 | * |
50 | 52 | * @param remoteConfigStatus The new remote config status. |
51 | 53 | */ |
52 | | - void setRemoteConfigStatus(Opamp.RemoteConfigStatus remoteConfigStatus); |
| 54 | + void setRemoteConfigStatus(RemoteConfigStatus remoteConfigStatus); |
53 | 55 |
|
54 | 56 | interface Callbacks { |
55 | 57 | /** |
@@ -81,17 +83,16 @@ interface Callbacks { |
81 | 83 | * @param client The relevant {@link OpampClient} instance. |
82 | 84 | * @param errorResponse The error returned by the Server. |
83 | 85 | */ |
84 | | - void onErrorResponse(OpampClient client, Opamp.ServerErrorResponse errorResponse); |
| 86 | + void onErrorResponse(OpampClient client, ServerErrorResponse errorResponse); |
85 | 87 |
|
86 | 88 | /** |
87 | 89 | * Called when the Agent receives a message that needs processing. See {@link MessageData} |
88 | 90 | * definition for the data that may be available for processing. During onMessage execution the |
89 | 91 | * {@link OpampClient} functions that change the status of the client may be called, e.g. if |
90 | | - * RemoteConfig is processed then {@link |
91 | | - * #setRemoteConfigStatus(opamp.proto.Opamp.RemoteConfigStatus)} should be called to reflect the |
92 | | - * processing result. These functions may also be called after onMessage returns. This is |
93 | | - * advisable if processing can take a long time. In that case returning quickly is preferable to |
94 | | - * avoid blocking the {@link OpampClient}. |
| 92 | + * RemoteConfig is processed then {@link #setRemoteConfigStatus(opamp.proto.RemoteConfigStatus)} |
| 93 | + * should be called to reflect the processing result. These functions may also be called after |
| 94 | + * onMessage returns. This is advisable if processing can take a long time. In that case |
| 95 | + * returning quickly is preferable to avoid blocking the {@link OpampClient}. |
95 | 96 | * |
96 | 97 | * @param client The relevant {@link OpampClient} instance. |
97 | 98 | * @param messageData The server response data that needs processing. |
|
0 commit comments