Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sshtools.common.hosts
Class AbstractHostKeyVerification

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          com.sshtools.common.hosts.AbstractHostKeyVerification

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, HostKeyVerification

Direct Known Subclasses:
  ConsoleHostKeyVerification, DialogHostKeyVerification

public abstract class AbstractHostKeyVerification
extends org.xml.sax.helpers.DefaultHandler
implements HostKeyVerification

DOCUMENT ME!

Constructor Summary
`AbstractHostKeyVerification()` Creates a new AbstractHostKeyVerification object.
`AbstractHostKeyVerification(java.lang.String hostFileName)` Creates a new AbstractHostKeyVerification object.

Method Summary
`java.util.Map` | `allowedHosts()` DOCUMENT ME!
`void` | `allowHost(java.lang.String host, java.lang.String hostKeyFingerprint, boolean always)` DOCUMENT ME!
`java.util.List` | `deniedHosts()` DOCUMENT ME!
`void` | `denyHost(java.lang.String host, boolean always)` DOCUMENT ME!
`void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qname)` DOCUMENT ME!
`boolean` | `isHostFileWriteable()` DOCUMENT ME!
`abstract void` | `onDeniedHost(java.lang.String host)` DOCUMENT ME!
`abstract void` | `onHostKeyMismatch(java.lang.String host, java.lang.String allowedHostKey, java.lang.String actualHostKey)` DOCUMENT ME!
`abstract void` | `onUnknownHost(java.lang.String host, java.lang.String hostKeyFingerprint)` DOCUMENT ME!
`void` | `removeAllowedHost(java.lang.String host)` DOCUMENT ME!
`void` | `removeDeniedHost(java.lang.String host)` DOCUMENT ME!
`void` | `saveHostFile()` DOCUMENT ME!
`void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attrs)` DOCUMENT ME!
`java.lang.String` | `toString()` DOCUMENT ME!
`boolean` | `verifyHost(java.lang.String host, SshPublicKey pk)` DOCUMENT ME!

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AbstractHostKeyVerification

    public AbstractHostKeyVerification()
                                throws InvalidHostFileException

  Creates a new AbstractHostKeyVerification object.

Throws:
  `InvalidHostFileException` - DOCUMENT ME!

### AbstractHostKeyVerification

    public AbstractHostKeyVerification(java.lang.String hostFileName)
                                throws InvalidHostFileException

  Creates a new AbstractHostKeyVerification object.

Parameters:
  `hostFileName` - DOCUMENT ME!
Throws:
  `InvalidHostFileException` - DOCUMENT ME!

Method Detail

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String localName,
                             java.lang.String qname,
                             org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException

  DOCUMENT ME!

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Parameters:
    `uri` - DOCUMENT ME!
    `localName` - DOCUMENT ME!
    `qname` - DOCUMENT ME!
    `attrs` - DOCUMENT ME!
  Throws:
    `org.xml.sax.SAXException` - DOCUMENT ME!

### endElement

    public void endElement(java.lang.String uri,
                           java.lang.String localName,
                           java.lang.String qname)
                    throws org.xml.sax.SAXException

  DOCUMENT ME!

  Specified by:
    `endElement` in interface `org.xml.sax.ContentHandler`
  Parameters:
    `uri` - DOCUMENT ME!
    `localName` - DOCUMENT ME!
    `qname` - DOCUMENT ME!
  Throws:
    `org.xml.sax.SAXException` - DOCUMENT ME!

### isHostFileWriteable

    public boolean isHostFileWriteable()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

### onDeniedHost

    public abstract void onDeniedHost(java.lang.String host)
                               throws TransportProtocolException

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!
  Throws:
    `TransportProtocolException` - DOCUMENT ME!

### onHostKeyMismatch

    public abstract void onHostKeyMismatch(java.lang.String host,
                                           java.lang.String allowedHostKey,
                                           java.lang.String actualHostKey)
                                    throws TransportProtocolException

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!
    `allowedHostKey` - DOCUMENT ME!
    `actualHostKey` - DOCUMENT ME!
  Throws:
    `TransportProtocolException` - DOCUMENT ME!

### onUnknownHost

    public abstract void onUnknownHost(java.lang.String host,
                                       java.lang.String hostKeyFingerprint)
                                throws TransportProtocolException

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!
    `hostKeyFingerprint` - DOCUMENT ME!
  Throws:
    `TransportProtocolException` - DOCUMENT ME!

### allowHost

    public void allowHost(java.lang.String host,
                          java.lang.String hostKeyFingerprint,
                          boolean always)
                   throws InvalidHostFileException

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!
    `hostKeyFingerprint` - DOCUMENT ME!
    `always` - DOCUMENT ME!
  Throws:
    `InvalidHostFileException` - DOCUMENT ME!

### allowedHosts

    public java.util.Map allowedHosts()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

### deniedHosts

    public java.util.List deniedHosts()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

### removeAllowedHost

    public void removeAllowedHost(java.lang.String host)

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!

### removeDeniedHost

    public void removeDeniedHost(java.lang.String host)

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!

### denyHost

    public void denyHost(java.lang.String host,
                         boolean always)
                  throws InvalidHostFileException

  DOCUMENT ME!

  Parameters:
    `host` - DOCUMENT ME!
    `always` - DOCUMENT ME!
  Throws:
    `InvalidHostFileException` - DOCUMENT ME!

### verifyHost

    public boolean verifyHost(java.lang.String host,
                              SshPublicKey pk)
                       throws TransportProtocolException

  DOCUMENT ME!

  Specified by:
    `verifyHost` in interface `HostKeyVerification`
  Parameters:
    `host` - DOCUMENT ME!
    `pk` - DOCUMENT ME!
  Returns:
    DOCUMENT ME!
  Throws:
    `TransportProtocolException` - DOCUMENT ME!

### saveHostFile

    public void saveHostFile()
                      throws InvalidHostFileException

  DOCUMENT ME!

  Throws:
    `InvalidHostFileException` - DOCUMENT ME!

### toString

    public java.lang.String toString()

  DOCUMENT ME!

  Returns:
    DOCUMENT ME!

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD