public interface ClientChannel extends Channel, StreamingChannel, ClientSessionHolder
AttributeRepository.AttributeKey<T>StreamingChannel.StreamingCHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMEMPTYNONE| 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, handleChannelRegistrationResult, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleOpenFailure, handleOpenSuccess, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, open, removeRequestHandler, removeRequestHandlers, resolveAttribute, resolveAttribute, writePacketgetSession, getSessionContextaddChannelListener, getChannelListenerProxy, removeChannelListenergetBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty, isEmptyclearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeattributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePairgetChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolveraddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenergetStreaming, setStreamingdefault ClientSession getClientSession()
getClientSession in interface ClientSessionHolderClientSession 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
IOExceptionSet<ClientChannelEvent> getChannelState()
waitFor(Collection, long)Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> mask, long timeout)
mask - The ClientChannelEvents 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 ClientChannelEvents 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–2021 The Apache Software Foundation. All rights reserved.