public class AggregateShellFactory extends AbstractLoggingBean implements ShellFactory, ShellFactorySelector
ChannelSession| Modifier and Type | Field and Description |
|---|---|
protected ShellFactory |
defaultFactory |
protected Collection<? extends ShellFactorySelector> |
selectors |
log| Constructor and Description |
|---|
AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors) |
AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors,
ShellFactory defaultFactory) |
| Modifier and Type | Method and Description |
|---|---|
Command |
createShell(ChannelSession channel) |
ShellFactory |
selectShellFactory(ChannelSession channel) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitselectShellFactoryprotected final ShellFactory defaultFactory
protected final Collection<? extends ShellFactorySelector> selectors
public AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors)
selectors - Selector ShellFactorySelector-s being consulted whether they wish to provide a
ShellFactory for the provided ChannelSession argument. If a selector returns
null then the next in line is consulted. If no match found then the default
InteractiveProcessShellFactory is usedpublic AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors, ShellFactory defaultFactory)
selectors - Selector ShellFactorySelector-s being consulted whether they wish to provide a
ShellFactory for the provided ChannelSession argument. If a selector
returns null then the next in line is consulted.defaultFactory - The (mandatory) default ShellFactory to use if no selector matchedpublic Command createShell(ChannelSession channel) throws IOException
createShell in interface ShellFactorychannel - The ChannelSession through which the command has been receivedCommand representing the shell to be executedIOException - If failed to create the shellpublic ShellFactory selectShellFactory(ChannelSession channel) throws IOException
selectShellFactory in interface ShellFactorySelectorchannel - The ChannelSessionShellFactory to use for the channel - null if noneIOException - If failed the selectionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.