public interface ExecWatch extends Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Gracefully close the Watch - the close message will not be sent until all pending messages have been sent.
|
CompletableFuture<Integer> |
exitCode()
Get a future that will be completed with the exit code.
|
InputStream |
getError()
Gets the
InputStream for stdErr if TtyExecErrorable.redirectingError() has been called. |
InputStream |
getErrorChannel()
Gets the
InputStream associated with channel 3, which
returns the final Status containing the exit code, which
could indicate abnormal termination. |
OutputStream |
getInput()
Gets the
OutputStream for stdIn if ContainerResource.redirectingInput() has been called. |
InputStream |
getOutput()
Gets the
InputStream for stdOut if TtyExecOutputErrorable.redirectingOutput() has been called. |
void |
resize(int cols,
int rows) |
OutputStream getInput()
OutputStream for stdIn if ContainerResource.redirectingInput() has been called.
Closing this stream does not immediately force sending. You will typically call close() after
you are finished writing - the close message will not be sent until all pending messages have been sent.
InputStream getOutput()
InputStream for stdOut if TtyExecOutputErrorable.redirectingOutput() has been called.InputStream getError()
InputStream for stdErr if TtyExecErrorable.redirectingError() has been called.InputStream getErrorChannel()
InputStream associated with channel 3, which
returns the final Status containing the exit code, which
could indicate abnormal termination.
See also exitCode()
void close()
close in interface AutoCloseableclose in interface Closeablevoid resize(int cols,
int rows)
CompletableFuture<Integer> exitCode()
Will be -1 if the exit code can't be determined from the status, or null if close is received before the exit code.
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.
Can be used as an alternative to
ExecListener.onFailure(Throwable, io.fabric8.kubernetes.client.dsl.ExecListener.Response)
and ExecListener.onExit(int, io.fabric8.kubernetes.api.model.Status) methods.
Copyright © 2015–2023 Red Hat. All rights reserved.