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 ShellFactory
selectShellFactory
(Collection<? extends ShellFactorySelector> selectors, ChannelSession channel) Consults each selector whether it wants to provide a factory for theChannelSession
selectShellFactory
(ChannelSession channelSession)
-
Method Details
-
selectShellFactory
- Parameters:
channelSession
- TheChannelSession
- Returns:
- The
ShellFactory
to use for the channel -null
if 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
- TheChannelSession
instance- Returns:
- The selected
ShellFactory
-null
if no selector matched (in which case the default factory is used) - Throws:
IOException
- if any selector threw it
-