Package io.fabric8.kubernetes.client.dsl
Interface ExecListener
-
public interface ExecListenerProvides callbacks for exec websocket events mainly for logging and testinglong running operations should not be called as these methods are called directly from the IO thread.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExecListener.Response
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidonClose(int code, String reason)Called when the server sends a close message.default voidonExit(int code, io.fabric8.kubernetes.api.model.Status status)Called after a Status message is seen on channel 3.default voidonFailure(Throwable t, ExecListener.Response failureResponse)Called when the transport or protocol layer of this web socket errors during communication.default voidonOpen()Called when the request has successfully been upgraded to a web socket.
-
-
-
Method Detail
-
onOpen
default void onOpen()
Called when the request has successfully been upgraded to a web socket.
-
onFailure
default void onFailure(Throwable t, ExecListener.Response failureResponse)
Called when the transport or protocol layer of this web socket errors during communication.- Parameters:
t- ThrowablefailureResponse- non-null if the failure is caused by the handshake
-
onClose
void onClose(int code, String reason)Called when the server sends a close message.- Parameters:
code- The RFC-compliant status code.reason- Reason for close or an empty string.
-
onExit
default void onExit(int code, io.fabric8.kubernetes.api.model.Status status)Called after a Status message is seen on channel 3.See https://github.com/kubernetes/kubernetes/issues/89899 - which explains there's currently no way to indicate end of input over a websocket, so you may not get an exit code when using stdIn.
See also
ExecWatch.exitCode()- Parameters:
code- the exit code, -1 will be used if the code cannot be determinedstatus- may be null if no valid status was received
-
-