public interface ClientChannel extends Channel, StreamingChannel, ClientSessionHolder
AttributeRepository.AttributeKey<T>
StreamingChannel.Streaming
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
EMPTY
NONE
Modifier and Type | Method and Description |
---|---|
IoInputStream |
getAsyncErr() |
IoOutputStream |
getAsyncIn() |
IoInputStream |
getAsyncOut() |
Set<ClientChannelEvent> |
getChannelState() |
String |
getChannelType() |
default ClientSession |
getClientSession() |
String |
getExitSignal() |
Integer |
getExitStatus() |
InputStream |
getInvertedErr() |
OutputStream |
getInvertedIn()
Access to an output stream to send data directly to the remote channel.
|
InputStream |
getInvertedOut() |
OpenFuture |
open() |
void |
setErr(OutputStream err) |
void |
setIn(InputStream in)
Set an input stream that will be read by this channel and forwarded to the remote channel.
|
void |
setOut(OutputStream out) |
static void |
validateCommandExitStatusCode(String command,
Integer exitStatus)
Makes sure remote command exit status has been provided and it is zero
|
default Set<ClientChannelEvent> |
waitFor(Collection<ClientChannelEvent> mask,
Duration timeout)
Waits until any of the specified events in the mask is signaled
|
Set<ClientChannelEvent> |
waitFor(Collection<ClientChannelEvent> mask,
long timeout)
Waits until any of the specified events in the mask is signaled
|
addRequestHandler, addRequestHandlers, getId, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleOpenFailure, handleOpenSuccess, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, open, removeRequestHandler, removeRequestHandlers, resolveAttribute, resolveAttribute, writePacket
getSession, getSessionContext
addChannelListener, getChannelListenerProxy, removeChannelListener
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty
clearAttributes, computeAttributeIfAbsent, removeAttribute, setAttribute
attributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePair
getChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolver
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
getStreaming, setStreaming
default ClientSession getClientSession()
getClientSession
in interface ClientSessionHolder
ClientSession
usedString getChannelType()
IoOutputStream getAsyncIn()
IoInputStream getAsyncOut()
IoInputStream getAsyncErr()
OutputStream getInvertedIn()
setIn(java.io.InputStream)
method and having the channel polling for data in that stream.InputStream getInvertedOut()
InputStream getInvertedErr()
void setIn(InputStream in)
getInvertedIn()
method instead and
write data directly.in
- an InputStream to be polled and forwardedvoid setOut(OutputStream out)
void setErr(OutputStream err)
OpenFuture open() throws IOException
IOException
Set<ClientChannelEvent> getChannelState()
waitFor(Collection, long)
Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> mask, long timeout)
mask
- The ClientChannelEvent
s masktimeout
- The timeout to wait (msec.) - if non-positive then foreverClientChannelEvent.TIMEOUT
if timeout expired before
the expected event was signaleddefault Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> mask, Duration timeout)
mask
- The ClientChannelEvent
s masktimeout
- The timeout to wait - if null then foreverClientChannelEvent.TIMEOUT
if timeout expired before
the expected event was signaledInteger getExitStatus()
null
if not signaledString getExitSignal()
null
if not signaledstatic void validateCommandExitStatusCode(String command, Integer exitStatus) throws RemoteException
command
- The command string - used only for exception textexitStatus
- The exit status valueRemoteException
- If exitStatus is null
or non-zeroCopyright © 2008–2022 The Apache Software Foundation. All rights reserved.