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.
@FunctionalInterface public interface ShellFactorySelector
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ShellFactory
selectShellFactory(java.util.Collection<? extends ShellFactorySelector> selectors, ChannelSession channel)
Consults each selector whether it wants to provide a factory for theChannelSession
ShellFactory
selectShellFactory(ChannelSession channelSession)
-
-
-
Method Detail
-
selectShellFactory
ShellFactory selectShellFactory(ChannelSession channelSession) throws java.io.IOException
- Parameters:
channelSession
- TheChannelSession
- Returns:
- The
ShellFactory
to use for the channel -null
if none - Throws:
java.io.IOException
- If failed the selection
-
selectShellFactory
static ShellFactory selectShellFactory(java.util.Collection<? extends ShellFactorySelector> selectors, ChannelSession channel) throws java.io.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:
java.io.IOException
- if any selector threw it
-
-