Skip to content

Commit b371629

Browse files
committed
Adding onClosing method
1 parent 4624809 commit b371629

File tree

1 file changed

+10
-4
lines changed
  • opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/websocket

1 file changed

+10
-4
lines changed

opamp-client/src/main/java/io/opentelemetry/opamp/client/internal/connectivity/websocket/WebSocket.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ public interface WebSocket {
3030
* Sends a message via the websocket connection.
3131
*
3232
* @param request The message payload.
33-
* @return {@link Boolean#FALSE} If the message can't be dispatched for any reason, whether the
34-
* websocket isn't running, or the connection isn't established, or it's terminated. {@link
35-
* Boolean#TRUE} if the message can get sent. Returning {@link Boolean#TRUE} doesn't guarantee
36-
* that the message will arrive at the remote peer.
33+
* @return {@code false} If the message can't be dispatched for any reason, whether the websocket
34+
* isn't running, or the connection isn't established, or it's terminated. {@code true} if the
35+
* message can get sent. Returning {@code true} doesn't guarantee that the message will arrive
36+
* at the remote peer.
3737
*/
3838
boolean send(byte[] request);
3939

@@ -45,6 +45,12 @@ interface Listener {
4545
*/
4646
void onOpen();
4747

48+
/**
49+
* Called when the closing handshake has started. No further messages will be sent after this
50+
* method call.
51+
*/
52+
void onClosing();
53+
4854
/** Called when the connection is terminated and no further messages can be transmitted. */
4955
void onClosed();
5056

0 commit comments

Comments
 (0)