|
Secure FTP Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.ssh.util.SshHostKeys
public class SshHostKeys
Associative host keys store. Contains host addresses with
associated host keys as one-to-one map.
Supports serialization for simplifying physical save/restore process.
Methods of this class are not thread-safe.
All methods throw NullPointerException
if some object
parameter is null
and IllegalArgumentException
if some parameter doesn't correspond to the method contract.
Constructor Summary | |
---|---|
SshHostKeys()
|
|
SshHostKeys(java.util.Map<java.net.InetAddress,java.util.Set<java.lang.String>> keys)
|
|
SshHostKeys(SshHostKeys that)
|
Method Summary | |
---|---|
void |
addKey(java.net.InetAddress host,
java.lang.String keyFingerprint)
Adds a new key entry to the store. |
void |
clear()
Clears the store contents. |
java.util.Iterator |
getHosts()
Returns current hosts collection contained in the store. |
java.util.Iterator<java.lang.String> |
getKeys(java.net.InetAddress host)
Returns keys iterator for the specified host. |
boolean |
isKnownKey(java.net.InetAddress host,
java.lang.String keyFingerprint)
Checks if the store contains the specified host key. |
void |
removeKey(java.net.InetAddress host,
java.lang.String keyFingerprint)
Removes the key entry for the specified host. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SshHostKeys(java.util.Map<java.net.InetAddress,java.util.Set<java.lang.String>> keys)
public SshHostKeys()
public SshHostKeys(SshHostKeys that)
Method Detail |
---|
public void addKey(java.net.InetAddress host, java.lang.String keyFingerprint)
host
- the host addresskeyFingerprint
- host key fingerprint stringpublic void removeKey(java.net.InetAddress host, java.lang.String keyFingerprint)
host
- target hostkeyFingerprint
- key fingerprint to removepublic void clear()
public java.util.Iterator getHosts()
public java.util.Iterator<java.lang.String> getKeys(java.net.InetAddress host)
host
- target host
public boolean isKnownKey(java.net.InetAddress host, java.lang.String keyFingerprint)
host
- hostkeyFingerprint
- host key fingerprint
true
if the store contains the specified key;
false
otherwisepublic java.lang.String toString()
toString
in class java.lang.Object
|
Secure FTP Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |