Top Description Fields Constructors Methods
org.apache.sshd.server.shell

public Class AggregateShellFactory

extends AbstractLoggingBean
implements ShellFactory, ShellFactorySelector
Class Inheritance
All Implemented Interfaces
org.apache.sshd.server.shell.ShellFactorySelector, org.apache.sshd.server.shell.ShellFactory
Imports
java.io.IOException, java.util.Collection, .Collections, .Objects, org.apache.sshd.common.util.logging.AbstractLoggingBean, org.apache.sshd.server.channel.ChannelSession, org.apache.sshd.server.command.Command

Provides different shell(s) based on some criteria of the provided ChannelSession
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
protected final ShellFactory
protected final Collection<? extends ShellFactorySelector>
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
public
AggregateShellFactory(Collection<? extends ShellFactorySelector>
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 used
selectors
)

public
AggregateShellFactory(Collection<? extends ShellFactorySelector>
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.
selectors
,
ShellFactory
The (mandatory) default ShellFactory to use if no selector matched
defaultFactory
)

Method Summary

Modifier and TypeMethod and Description
public Command
createShell(ChannelSession
The ChannelSession through which the command has been received
channel
)

Implements org.apache.sshd.server.shell.ShellFactory.createShell.

public ShellFactory
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

defaultFactoryback to summary
protected final ShellFactory defaultFactory
selectorsback to summary
protected final Collection<? extends ShellFactorySelector> selectors

Constructor Detail

AggregateShellFactoryback to summary
public AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors)
Parameters
selectors:Collection<? extends ShellFactorySelector>

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 used

AggregateShellFactoryback to summary
public AggregateShellFactory(Collection<? extends ShellFactorySelector> selectors, ShellFactory defaultFactory)
Parameters
selectors:Collection<? extends ShellFactorySelector>

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:ShellFactory

The (mandatory) default ShellFactory to use if no selector matched

Method Detail

createShellback to summary
public Command createShell(ChannelSession channel) throws IOException

Implements org.apache.sshd.server.shell.ShellFactory.createShell.

Parameters
channel:ChannelSession

Doc from org.apache.sshd.server.shell.ShellFactory.createShell.

The ChannelSession through which the command has been received

Returns:Command

Doc from org.apache.sshd.server.shell.ShellFactory.createShell.

The Command representing the shell to be executed

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.server.shell.ShellFactory.createShell.

If failed to create the shell

selectShellFactoryback to summary
public ShellFactory selectShellFactory(ChannelSession channel) throws IOException

Implements org.apache.sshd.server.shell.ShellFactorySelector.selectShellFactory.

Parameters
channel:ChannelSession

Doc from org.apache.sshd.server.shell.ShellFactorySelector.selectShellFactory.

The ChannelSession

Returns:ShellFactory

Doc from org.apache.sshd.server.shell.ShellFactorySelector.selectShellFactory.

The ShellFactory to use for the channel - null if none

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.server.shell.ShellFactorySelector.selectShellFactory.

If failed the selection