Interface SubsystemFactory

    • Method Detail

      • createSubsystem

        Command createSubsystem​(ChannelSession channel)
                         throws java.io.IOException
        Parameters:
        channel - The ChannelSession through which the command has been received
        Returns:
        a non null Command instance representing the subsystem to be run
        Throws:
        java.io.IOException - if failed to create the instance
      • createSubsystem

        static Command createSubsystem​(ChannelSession channel,
                                       java.util.Collection<? extends SubsystemFactory> factories,
                                       java.lang.String name)
                                throws java.io.IOException
        Parameters:
        channel - The ChannelSession through which the command has been received
        factories - The available SubsystemFactory-ies - ignored if null/empty
        name - Requested subsystem name
        Returns:
        The created Command instance representing the subsystem to be run - null if no match found
        Throws:
        java.io.IOException - If found a matching factory but failed to create the command instance