Package org.apache.sshd.agent.local
Class LocalAgentFactory
- java.lang.Object
-
- org.apache.sshd.agent.local.LocalAgentFactory
-
- All Implemented Interfaces:
SshAgentFactory
public class LocalAgentFactory extends Object implements SshAgentFactory
-
-
Field Summary
Fields Modifier and Type Field Description static List<ChannelFactory>
DEFAULT_FORWARDING_CHANNELS
-
Fields inherited from interface org.apache.sshd.agent.SshAgentFactory
DEFAULT_PROXY_AUTH_CHANNEL_TYPE, PREFER_UNIX_AGENT, PROXY_AUTH_CHANNEL_TYPE
-
-
Constructor Summary
Constructors Constructor Description LocalAgentFactory()
LocalAgentFactory(SshAgent agent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SshAgent
createClient(FactoryManager manager)
Create an SshAgent that can be used on the client side by the authentication process to send possible keys.SshAgentServer
createServer(ConnectionService service)
Create the server side that will be used by other SSH clients.SshAgent
getAgent()
List<ChannelFactory>
getChannelForwardingFactories(FactoryManager manager)
The channels are requested by the ssh server when forwarding a client request.
-
-
-
Field Detail
-
DEFAULT_FORWARDING_CHANNELS
public static final List<ChannelFactory> DEFAULT_FORWARDING_CHANNELS
-
-
Constructor Detail
-
LocalAgentFactory
public LocalAgentFactory()
-
LocalAgentFactory
public LocalAgentFactory(SshAgent agent)
-
-
Method Detail
-
getAgent
public SshAgent getAgent()
-
getChannelForwardingFactories
public List<ChannelFactory> getChannelForwardingFactories(FactoryManager manager)
Description copied from interface:SshAgentFactory
The channels are requested by the ssh server when forwarding a client request. The channel will receive agent requests and need to forward them to the agent, either local or through another proxy.- Specified by:
getChannelForwardingFactories
in interfaceSshAgentFactory
- Parameters:
manager
- TheFactoryManager
through which the request is made- Returns:
- The
ChannelFactory
-ies used to create channels on the client side
-
createClient
public SshAgent createClient(FactoryManager manager) throws IOException
Description copied from interface:SshAgentFactory
Create an SshAgent that can be used on the client side by the authentication process to send possible keys.- Specified by:
createClient
in interfaceSshAgentFactory
- Parameters:
manager
- TheFactoryManager
instance- Returns:
- The
SshAgent
instance - Throws:
IOException
- If failed to create the client
-
createServer
public SshAgentServer createServer(ConnectionService service) throws IOException
Description copied from interface:SshAgentFactory
Create the server side that will be used by other SSH clients. It will usually create a channel that will forward the requests to the original client.- Specified by:
createServer
in interfaceSshAgentFactory
- Parameters:
service
- TheConnectionService
to use- Returns:
- The
SshAgentServer
instance - Throws:
IOException
- If failed to create the server
-
-