Class ExecWebSocketListener
- java.lang.Object
-
- io.fabric8.kubernetes.client.dsl.internal.ExecWebSocketListener
-
- All Implemented Interfaces:
ExecWatch,WebSocket.Listener,Closeable,AutoCloseable
public class ExecWebSocketListener extends Object implements ExecWatch, AutoCloseable, WebSocket.Listener
AWebSocket.Listenerfor exec operations. This listener, is only responsible for the resources it creates. Externally passed resource, will not get closed, by this listener. All other resources will be cleaned up once, ONLY when the close() method is called. ExecListener methods, onClose() and onFailure are mutually exclusive and are meant to be called once and only once. Failures that propagate after a close() operation will not be propagated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceExecWebSocketListener.MessageHandler
-
Constructor Summary
Constructors Constructor Description ExecWebSocketListener(PodOperationContext context, Executor executor, KubernetesSerialization serialization)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CompletableFuture<Integer>exitCode()InputStreamgetError()InputStreamgetErrorChannel()OutputStreamgetInput()InputStreamgetOutput()voidonClose(WebSocket webSocket, int code, String reason)voidonError(WebSocket webSocket, Throwable t)voidonMessage(WebSocket webSocket, String text)voidonMessage(WebSocket webSocket, ByteBuffer bytes)voidonOpen(WebSocket webSocket)static intparseExitCode(io.fabric8.kubernetes.api.model.Status status)voidresize(int cols, int rows)static StringtoString(ByteBuffer buffer)
-
-
-
Constructor Detail
-
ExecWebSocketListener
public ExecWebSocketListener(PodOperationContext context, Executor executor, KubernetesSerialization serialization)
-
-
Method Detail
-
toString
public static String toString(ByteBuffer buffer)
-
close
public void close()
-
onOpen
public void onOpen(WebSocket webSocket)
- Specified by:
onOpenin interfaceWebSocket.Listener
-
onError
public void onError(WebSocket webSocket, Throwable t)
- Specified by:
onErrorin interfaceWebSocket.Listener
-
onMessage
public void onMessage(WebSocket webSocket, String text)
- Specified by:
onMessagein interfaceWebSocket.Listener
-
onMessage
public void onMessage(WebSocket webSocket, ByteBuffer bytes)
- Specified by:
onMessagein interfaceWebSocket.Listener
-
onClose
public void onClose(WebSocket webSocket, int code, String reason)
- Specified by:
onClosein interfaceWebSocket.Listener
-
getInput
public OutputStream getInput()
-
getOutput
public InputStream getOutput()
-
getError
public InputStream getError()
-
getErrorChannel
public InputStream getErrorChannel()
- Specified by:
getErrorChannelin interfaceExecWatch
-
parseExitCode
public static int parseExitCode(io.fabric8.kubernetes.api.model.Status status)
-
exitCode
public CompletableFuture<Integer> exitCode()
-
-