public class ExecWebSocketListener extends okhttp3.WebSocketListener implements ExecWatch, AutoCloseable
WebSocketListener for 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.| Constructor and Description |
|---|
ExecWebSocketListener(Config config,
InputStream in,
OutputStream out,
OutputStream err,
OutputStream errChannel,
PipedOutputStream inputPipe,
PipedInputStream outputPipe,
PipedInputStream errorPipe,
PipedInputStream errorChannelPipe,
ExecListener listener)
Deprecated.
|
ExecWebSocketListener(Config config,
InputStream in,
OutputStream out,
OutputStream err,
OutputStream errChannel,
PipedOutputStream inputPipe,
PipedInputStream outputPipe,
PipedInputStream errorPipe,
PipedInputStream errorChannelPipe,
ExecListener listener,
Integer bufferSize) |
ExecWebSocketListener(Config config,
InputStream in,
OutputStream out,
OutputStream err,
PipedOutputStream inputPipe,
PipedInputStream outputPipe,
PipedInputStream errorPipe,
ExecListener listener)
Deprecated.
|
ExecWebSocketListener(InputStream in,
OutputStream out,
OutputStream err,
PipedOutputStream inputPipe,
PipedInputStream outputPipe,
PipedInputStream errorPipe,
ExecListener listener)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Watch.
|
void |
close(int code,
String reason) |
InputStream |
getError() |
InputStream |
getErrorChannel() |
OutputStream |
getInput() |
InputStream |
getOutput() |
void |
onClosed(okhttp3.WebSocket webSocket,
int code,
String reason) |
void |
onClosing(okhttp3.WebSocket webSocket,
int code,
String reason) |
void |
onFailure(okhttp3.WebSocket webSocket,
Throwable t,
okhttp3.Response response) |
void |
onMessage(okhttp3.WebSocket webSocket,
okio.ByteString bytes) |
void |
onOpen(okhttp3.WebSocket webSocket,
okhttp3.Response response) |
void |
resize(int cols,
int rows) |
void |
waitUntilReady() |
@Deprecated public ExecWebSocketListener(InputStream in, OutputStream out, OutputStream err, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, ExecListener listener)
@Deprecated public ExecWebSocketListener(Config config, InputStream in, OutputStream out, OutputStream err, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, ExecListener listener)
@Deprecated public ExecWebSocketListener(Config config, InputStream in, OutputStream out, OutputStream err, OutputStream errChannel, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, PipedInputStream errorChannelPipe, ExecListener listener)
public ExecWebSocketListener(Config config, InputStream in, OutputStream out, OutputStream err, OutputStream errChannel, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, PipedInputStream errorChannelPipe, ExecListener listener, Integer bufferSize)
public void close()
ExecWatchpublic void close(int code,
String reason)
public void waitUntilReady()
public void onOpen(okhttp3.WebSocket webSocket,
okhttp3.Response response)
onOpen in class okhttp3.WebSocketListenerpublic void onFailure(okhttp3.WebSocket webSocket,
Throwable t,
okhttp3.Response response)
onFailure in class okhttp3.WebSocketListenerpublic void onMessage(okhttp3.WebSocket webSocket,
okio.ByteString bytes)
onMessage in class okhttp3.WebSocketListenerpublic void onClosing(okhttp3.WebSocket webSocket,
int code,
String reason)
onClosing in class okhttp3.WebSocketListenerpublic void onClosed(okhttp3.WebSocket webSocket,
int code,
String reason)
onClosed in class okhttp3.WebSocketListenerpublic OutputStream getInput()
public InputStream getOutput()
public InputStream getError()
public InputStream getErrorChannel()
getErrorChannel in interface ExecWatchCopyright © 2015–2022 Red Hat. All rights reserved.