Package io.kubernetes.client
Class PortForward.PortForwardResult
java.lang.Object
io.kubernetes.client.PortForward.PortForwardResult
- Enclosing class:
- PortForward
PortForwardResult contains the result of an Attach call, it includes streams for stdout stderr
and stdin.
-
Constructor Summary
ConstructorsConstructorDescriptionPortForwardResult
(WebSocketStreamHandler handler, List<Integer> ports) Constructor -
Method Summary
Modifier and TypeMethodDescriptiongetErrorStream
(int port) Get the error stream for a port number (e.g.getInputStream
(int port) Get the input stream for a port number (e.g.getOutboundStream
(int port) Get the output stream for the specified port number (e.g.void
init()
Initialize the connection.
-
Constructor Details
-
PortForwardResult
Constructor- Parameters:
handler
- The web socket handlerports
- The list of ports that are being forwarded.- Throws:
IOException
-
-
Method Details
-
init
Initialize the connection. Must be called after the web socket has been opened.- Throws:
IOException
-
getOutboundStream
Get the output stream for the specified port number (e.g. 80)- Parameters:
port
- The port number to get the stream for.- Returns:
- The OutputStream for the specified port, null if there is no such port.
-
getErrorStream
Get the error stream for a port number (e.g. 80)- Parameters:
port
- The port number to get the stream for.- Returns:
- The error stream, or null if there is no such port.
-
getInputStream
Get the input stream for a port number (e.g. 80)- Parameters:
port
- The port number to get the stream for.- Returns:
- The input stream, or null if no such port exists.
- Throws:
IOException
-