org.apache.maven.wagon.providers.ssh.knownhost
Class FileKnownHostsProvider

java.lang.Object
  extended by org.apache.maven.wagon.providers.ssh.knownhost.AbstractKnownHostsProvider
      extended by org.apache.maven.wagon.providers.ssh.knownhost.StreamKnownHostsProvider
          extended by org.apache.maven.wagon.providers.ssh.knownhost.FileKnownHostsProvider
All Implemented Interfaces:
KnownHostsProvider

public class FileKnownHostsProvider
extends StreamKnownHostsProvider

Provides known hosts from a file

Since:
Sep 12, 2005
Author:
Juan F. Codagnone
Plexus component:
role-hint:
"file"
instantiation-strategy:
"per-lookup"
role:
"org.apache.maven.wagon.providers.ssh.knownhost.KnownHostsProvider"

Field Summary
 
Fields inherited from class org.apache.maven.wagon.providers.ssh.knownhost.AbstractKnownHostsProvider
contents, knownHosts
 
Fields inherited from interface org.apache.maven.wagon.providers.ssh.knownhost.KnownHostsProvider
ROLE
 
Constructor Summary
FileKnownHostsProvider()
          Creates a FileKnownHostsProvider using as file openssh knwon_host
FileKnownHostsProvider(File file)
          Creates the FileKnownHostsProvider.
 
Method Summary
 File getFile()
           
 void storeKnownHosts(String contents)
           
 
Methods inherited from class org.apache.maven.wagon.providers.ssh.knownhost.StreamKnownHostsProvider
loadKnownHosts
 
Methods inherited from class org.apache.maven.wagon.providers.ssh.knownhost.AbstractKnownHostsProvider
getContents, getHostKeyChecking, setHostKeyChecking
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileKnownHostsProvider

public FileKnownHostsProvider(File file)
                       throws IOException
Creates the FileKnownHostsProvider.

Parameters:
file - the file that holds the known hosts, in the openssh format
Throws:
IOException

FileKnownHostsProvider

public FileKnownHostsProvider()
                       throws IOException
Creates a FileKnownHostsProvider using as file openssh knwon_host

Throws:
IOException
See Also:
FileKnownHostsProvider(File)
Method Detail

storeKnownHosts

public void storeKnownHosts(String contents)
                     throws IOException
Specified by:
storeKnownHosts in interface KnownHostsProvider
Overrides:
storeKnownHosts in class AbstractKnownHostsProvider
Throws:
IOException

getFile

public File getFile()


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.