Package org.apache.sshd.server.shell
Interface ShellFactorySelector
- All Known Implementing Classes:
AggregateShellFactory,ScpCommandFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShellFactoryselectShellFactory(Collection<? extends ShellFactorySelector> selectors, ChannelSession channel) Consults each selector whether it wants to provide a factory for theChannelSessionselectShellFactory(ChannelSession channelSession)
-
Method Details
-
selectShellFactory
- Parameters:
channelSession- TheChannelSession- Returns:
- The
ShellFactoryto use for the channel -nullif none - Throws:
IOException- If failed the selection
-
selectShellFactory
static ShellFactory selectShellFactory(Collection<? extends ShellFactorySelector> selectors, ChannelSession channel) throws IOException Consults each selector whether it wants to provide a factory for theChannelSession- Parameters:
selectors- TheShellFactorySelector-s to consult - ignored ifnull/emptychannel- TheChannelSessioninstance- Returns:
- The selected
ShellFactory-nullif no selector matched (in which case the default factory is used) - Throws:
IOException- if any selector threw it
-