OpenNMS API 1.2.9

## org.opennms.netmgt.capsd
Class MSExchangePlugin

    java.lang.Object
      org.opennms.netmgt.capsd.AbstractPlugin
          org.opennms.netmgt.capsd.MSExchangePlugin

All Implemented Interfaces:
  Plugin

public final class MSExchangePlugin
extends AbstractPlugin

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

Author:
  Mike , Weave , OpenNMS

Field Summary
`private static java.lang.String` `BANNER_STRING` The banner string to look for.
`private static int` `DEFAULT_IMAP_PORT` The default port on which to check for IMAP service.
`private static int` `DEFAULT_MAPI_PORT` The default port on which to check for MAPI service.
`private static int` `DEFAULT_POP3_PORT` The default port on which to check for POP3 service.
`private static int` `DEFAULT_RETRY` Default number of retries.
`private static int` `DEFAULT_TIMEOUT` Default timeout (in milliseconds).
`private static int` `IMAP_INDEX` The array location for IMAP information.
`private static int` `POP3_INDEX` The array location for POP3 information.
`private static java.lang.String` `PROTOCOL_NAME` The name of this protocol plugin

Constructor Summary
`MSExchangePlugin()`

Method Summary
`java.lang.String` `getProtocolName()` Returns the name of the protocol that this plugin checks on the target system for support.
`boolean` `isProtocolSupported(java.net.InetAddress address)` Returns true if the protocol defined by this plugin is supported.
`boolean` `isProtocolSupported(java.net.InetAddress address, java.util.Map qualifiers)` Returns true if the protocol defined by this plugin is supported.
`private boolean[]` `isServer(java.net.InetAddress host, int[] ports, int retries, int timeout)` Test to see if the passed host is running Microsoft Exchange server.
`private boolean` `isServer(java.net.InetAddress host, int port, int retries, int timeout)`

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

Field Detail

### PROTOCOL_NAME

    private static final java.lang.String PROTOCOL_NAME

  The name of this protocol plugin

  See Also:
    Constant Field Values

### BANNER_STRING

    private static final java.lang.String BANNER_STRING

  The banner string to look for.

  See Also:
    Constant Field Values

### DEFAULT_POP3_PORT

    private static final int DEFAULT_POP3_PORT

  The default port on which to check for POP3 service.

  See Also:
    Constant Field Values

### DEFAULT_IMAP_PORT

    private static final int DEFAULT_IMAP_PORT

  The default port on which to check for IMAP service.

  See Also:
    Constant Field Values

### DEFAULT_MAPI_PORT

    private static final int DEFAULT_MAPI_PORT

  The default port on which to check for MAPI service. To check for MAPI we check the http-rpc-epmap/ncacn_http service on port 593. This port/service is used by exchange for doing RPC over HTTP.

  See Also:
    Constant Field Values

### DEFAULT_RETRY

    private static final int DEFAULT_RETRY

  Default number of retries.

  See Also:
    Constant Field Values

### DEFAULT_TIMEOUT

    private static final int DEFAULT_TIMEOUT

  Default timeout (in milliseconds).

  See Also:
    Constant Field Values

### POP3_INDEX

    private static final int POP3_INDEX

  The array location for POP3 information.

  See Also:
    Constant Field Values

### IMAP_INDEX

    private static final int IMAP_INDEX

  The array location for IMAP information.

  See Also:
    Constant Field Values

Constructor Detail

### MSExchangePlugin

    public MSExchangePlugin()

Method Detail

### isServer

    private boolean isServer(java.net.InetAddress host,
                             int port,
                             int retries,
                             int timeout)

### isServer

    private boolean[] isServer(java.net.InetAddress host,
                               int[] ports,
                               int retries,
                               int timeout)

  Test to see if the passed host is running Microsoft Exchange server. If the remote host is running POP3, IMAP or MAPI and we are able to retreive a banner from any of the ports these services listen on wich include the text "Microsoft Exchange" then this method will return true. Otherwise a false value is returned to the caller.

  Parameters:
    `host` - The remote host to test.
    `ports` - The remote ports to test. Port value of -1 indicates that all ports should be tested, otherwise only the specified port/protocol will be tested..
  Returns:
    The array of supported protocols by the exchange server The values are in the order POP3, IMAP, MAPI in the returned array.

### getProtocolName

    public java.lang.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(java.net.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.

### isProtocolSupported

    public boolean isProtocolSupported(java.net.InetAddress address,
                                       java.util.Map qualifiers)

  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. The qualifier map passed to the method is used by the plugin to return additional information by key-name. These key-value pairs can be added to service events if needed.

  Specified by:
    `isProtocolSupported` in interface `Plugin`
  Specified by:
    `isProtocolSupported` in class `AbstractPlugin`
  Parameters:
    `address` - The address to check for support.
    `qualifiers` - The map where qualification are set by the plugin.
  Returns:
    True if the protocol is supported by the address.

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.