net.lag.jaramiko
Interface ChannelFactory


public interface ChannelFactory

Simple interface for a factory to create Channels. You only need to use this if you are creating custom channel types that need special features like ChannelRequests -- in other words, implementing new protocols over SSH. Use Transport.registerChannelKind(java.lang.String, net.lag.jaramiko.ChannelFactory) to register the factory with your Transport.


Method Summary
 Channel createChannel(java.lang.String kind, int chanid, java.util.List params)
          Create a channel from parameters that are in the form of a list.
 Channel createChannel(java.lang.String kind, int chanid, Message params)
          Create a channel from parameters that are in the form of an SSH Message.
 

Method Detail

createChannel

Channel createChannel(java.lang.String kind,
                      int chanid,
                      java.util.List params)
Create a channel from parameters that are in the form of a list. This is called from ClientTransport when a client channel is opened.

Parameters:
kind - arbitrary string (defined by the argument to ClientTransport.openChannel(java.lang.String, java.util.List, int)) indicating the kind of channel to open
chanid - the transport-defined ID for the channel
params - any parameters that were passed from openChannel.
Returns:
an appropriate Channel object.

createChannel

Channel createChannel(java.lang.String kind,
                      int chanid,
                      Message params)
Create a channel from parameters that are in the form of an SSH Message. This is called from ServerTransport when the remote client has requested a special channel type. The parameters (if any) can be retrieved from the Message object.

Parameters:
kind - arbitrary string (defined by the argument to ClientTransport.openChannel(java.lang.String, java.util.List, int)) string indicating the kind of channel to open
chanid - the transport-defined ID for the channel
params - parameters that were originally passed by the remote client as a List.
Returns:
an appropriate Channel object