Package org.apache.sshd.server.shell
Interface ShellFactorySelector
-
- All Known Implementing Classes:
AggregateShellFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ShellFactorySelector
- Author:
- Apache MINA SSHD Project
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ShellFactoryselectShellFactory(Collection<? extends ShellFactorySelector> selectors, ChannelSession channel)Consults each selector whether it wants to provide a factory for theChannelSessionShellFactoryselectShellFactory(ChannelSession channelSession)
-
-
-
Method Detail
-
selectShellFactory
ShellFactory selectShellFactory(ChannelSession channelSession) throws IOException
- 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
-
-