org.opennms.netmgt.capsd.plugins
Class SshPlugin

java.lang.Object
  extended by org.opennms.netmgt.capsd.AbstractPlugin
      extended by org.opennms.netmgt.capsd.plugins.SshPlugin
All Implemented Interfaces:
Plugin

public final class SshPlugin
extends AbstractPlugin

This class is designed to be used by the capabilities daemon to test for the existence of an SSH server on remote interfaces. The class implements the Plugin interface that allows it to be used along with other plugins by the daemon.

Author:
Benjamin Reed, OpenNMS

Constructor Summary
SshPlugin()
           
 
Method Summary
 String getProtocolName()
          Returns the name of the protocol that this plugin checks on the target system for support.
 boolean isProtocolSupported(InetAddress address)
          Returns true if the protocol defined by this plugin is supported.
 boolean isProtocolSupported(InetAddress address, Map<String,Object> parameters)
          Returns true if the protocol defined by this plugin is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SshPlugin

public SshPlugin()
Method Detail

getProtocolName

public String getProtocolName()
Returns the name of the protocol that this plugin checks on the target system for support.

Specified by:
getProtocolName in interface Plugin
Specified by:
getProtocolName in class AbstractPlugin
Returns:
The protocol name for this plugin.

isProtocolSupported

public boolean isProtocolSupported(InetAddress address)
Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller.

Specified by:
isProtocolSupported in interface Plugin
Specified by:
isProtocolSupported in class AbstractPlugin
Parameters:
address - The address to check for support.
Returns:
True if the protocol is supported by the address.
Throws:
UnsupportedOperationException - This is always thrown by this plugin.

isProtocolSupported

public boolean isProtocolSupported(InetAddress address,
                                   Map<String,Object> parameters)
Returns true if the protocol defined by this plugin is supported. If the protocol is not supported then a false value is returned to the caller. During the poll an attempt is made to connect on the specified port. If the connection request is successful, the banner line generated by the interface is parsed and if the banner text indicates that we are talking to Provided that the interface's response is valid we mark the poll status as available and return.

Specified by:
isProtocolSupported in interface Plugin
Specified by:
isProtocolSupported in class AbstractPlugin
Parameters:
address - the address to poll
parameters - the package parameters (timeout, retry, etc...) to be used for this poll
Returns:
true if the protocol is supported by the address


Copyright © 2009. All Rights Reserved.