public class ExecWebSocketListener extends Object implements ExecWatch, AutoCloseable, WebSocket.Listener
WebSocket.Listener 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(InputStream in,
OutputStream out,
OutputStream err,
OutputStream errChannel,
PipedOutputStream inputPipe,
PipedInputStream outputPipe,
PipedInputStream errorPipe,
PipedInputStream errorChannelPipe,
ExecListener listener,
Integer bufferSize) |
| 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 |
onClose(WebSocket webSocket,
int code,
String reason) |
void |
onError(WebSocket webSocket,
Throwable t) |
void |
onMessage(WebSocket webSocket,
ByteBuffer bytes) |
void |
onOpen(WebSocket webSocket) |
void |
resize(int cols,
int rows) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonMessagepublic ExecWebSocketListener(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 onOpen(WebSocket webSocket)
onOpen in interface WebSocket.Listenerpublic void onError(WebSocket webSocket, Throwable t)
onError in interface WebSocket.Listenerpublic void onMessage(WebSocket webSocket, ByteBuffer bytes)
onMessage in interface WebSocket.Listenerpublic void onClose(WebSocket webSocket, int code, String reason)
onClose in interface WebSocket.Listenerpublic OutputStream getInput()
public InputStream getOutput()
public InputStream getError()
public InputStream getErrorChannel()
getErrorChannel in interface ExecWatchCopyright © 2015–2022 Red Hat. All rights reserved.