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, wait
onMessage
public ExecWebSocketListener(InputStream in, OutputStream out, OutputStream err, OutputStream errChannel, PipedOutputStream inputPipe, PipedInputStream outputPipe, PipedInputStream errorPipe, PipedInputStream errorChannelPipe, ExecListener listener, Integer bufferSize)
public void close()
ExecWatch
public void close(int code, String reason)
public void onOpen(WebSocket webSocket)
onOpen
in interface WebSocket.Listener
public void onError(WebSocket webSocket, Throwable t)
onError
in interface WebSocket.Listener
public void onMessage(WebSocket webSocket, ByteBuffer bytes)
onMessage
in interface WebSocket.Listener
public void onClose(WebSocket webSocket, int code, String reason)
onClose
in interface WebSocket.Listener
public OutputStream getInput()
public InputStream getOutput()
public InputStream getError()
public InputStream getErrorChannel()
getErrorChannel
in interface ExecWatch
Copyright © 2015–2020 Red Hat. All rights reserved.