org.opennms.netmgt.xmlrpcd
Interface Provisioner

All Known Implementing Classes:
OpenNMSProvisioner

public interface Provisioner

Author:
Mathew Brozowski, David Hustace

Method Summary
 boolean addServiceDatabase(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration, String username, String password, String driver, String url)
          This method defines a new package and Database(JDBC) service using the serviceId as the name of the polling package and service name within that package.
 boolean addServiceDNS(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration, int port, String hostname)
          This method defines a new package and DNS service using the serviceId as the name of the polling package and service name within that package.
 boolean addServiceHTTP(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration, String hostName, int port, String responseCode, String contentCheck, String url, String user, String passwd, String agent)
          This method defines a new package and HTTP service using the serviceId as the name of the polling package and service name within that package.
 boolean addServiceHTTPS(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration, String hostName, int port, String responseCode, String contentCheck, String url, String user, String passwd, String agent)
          This method defines a new package and HTTPS service using the serviceId as the name of the polling package and service name within that package.
 boolean addServiceICMP(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration)
          This method defines a new package and ICMP service using the serviceId as the name of the polling package and service name within that package.
 boolean addServiceTCP(String serviceId, int retries, int timeout, int interval, int downTimeInterval, int downTimeDuration, int port, String contentCheck)
          This method defines a new package and TCP service using the serviceId as the name of the polling package and service name within that package.
 Map getServiceConfiguration(String pkName, String serviceId)
          Returns an XML-RPC compatible hash map representing the current configuration (see addService params) for the matching String serviceId When a service is defined using XML-RPC, the package name and the service name will be the same.
 

Method Detail

addServiceICMP

boolean addServiceICMP(String serviceId,
                       int retries,
                       int timeout,
                       int interval,
                       int downTimeInterval,
                       int downTimeDuration)
This method defines a new package and ICMP service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined ICMP service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges

addServiceDNS

boolean addServiceDNS(String serviceId,
                      int retries,
                      int timeout,
                      int interval,
                      int downTimeInterval,
                      int downTimeDuration,
                      int port,
                      String hostname)
This method defines a new package and DNS service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined DNS service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
port - int the port to poll for DNS service
hostname - String the hostname to resolve with the DNS service
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges

addServiceTCP

boolean addServiceTCP(String serviceId,
                      int retries,
                      int timeout,
                      int interval,
                      int downTimeInterval,
                      int downTimeDuration,
                      int port,
                      String contentCheck)
This method defines a new package and TCP service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined TCP service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
port - int the port to attempt to connect to determine if the service is accepting connections
contentCheck - String a string to check for in the returned banner of the TCP service or "" if no check is desired.
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges

addServiceHTTP

boolean addServiceHTTP(String serviceId,
                       int retries,
                       int timeout,
                       int interval,
                       int downTimeInterval,
                       int downTimeDuration,
                       String hostName,
                       int port,
                       String responseCode,
                       String contentCheck,
                       String url,
                       String user,
                       String passwd,
                       String agent)
                       throws MalformedURLException
This method defines a new package and HTTP service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined HTTP service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
hostName - String the virtual host (requires a url other than just "/")
port - int the port to attempt to connect to determine if the service is accepting connections
responseCode - String a set of responseCodes that are considered valid. This string should consist of one or more ranges ( [range],[range],...) where a range is either a single number or a pair of number separated by a - ( 200,202-300 ). If the default range check is desire this can be "" The default range check is defined by the HttpMonitor plugin and is currently 100-499 for / or 100-399 for other URLs
contentCheck - String a string to check for in the returned web page. This string is either an exact string to search for in the page or a regular expression. To indicate a regular expression prefix the string with a '~' character
url - String the path portion of the URL to check on the server
user - String the user to use with basic authentication or "" if no authentication required
passwd - String the password to use with the user parameter with doing authentication
agent - String the String to use for the User agent field when communicating with the server
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges
MalformedURLException

addServiceHTTPS

boolean addServiceHTTPS(String serviceId,
                        int retries,
                        int timeout,
                        int interval,
                        int downTimeInterval,
                        int downTimeDuration,
                        String hostName,
                        int port,
                        String responseCode,
                        String contentCheck,
                        String url,
                        String user,
                        String passwd,
                        String agent)
                        throws MalformedURLException
This method defines a new package and HTTPS service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined HTTPS service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
hostName - String the virtual host (requires a url other than just "/")
port - int the port to attempt to connect to determine if the service is accepting connections
responseCode - String a set of responseCodes that are considered valid. This string should consist of one or more ranges ( [range],[range],...) where a range is either a single number or a pair of number separated by a - ( 200,202-300 ). If the default range check is desire this can be "" The default range check is defined by the HttpMonitor plugin and is currently 100-499 for / or 100-399 for other URLs
contentCheck - String a string to check for in the returned web page. This string is either an exact string to search for in the page or a regular expression. To indicate a regular expression prefix the string with a '~' character
url - String the path portion of the URL to check on the server
user - String the user to use with basic authentication or "" if no authentication required
passwd - String the password to use with the user parameter with doing authentication
agent - String the String to use for the User agent field when communicating with the server
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges
MalformedURLException

addServiceDatabase

boolean addServiceDatabase(String serviceId,
                           int retries,
                           int timeout,
                           int interval,
                           int downTimeInterval,
                           int downTimeDuration,
                           String username,
                           String password,
                           String driver,
                           String url)
This method defines a new package and Database(JDBC) service using the serviceId as the name of the polling package and service name within that package. If the same serviceId is used again, it redefines the service. To add an interface to this newly defined Database(JDBC) service, send an EventConstants.UPDATE_SERVICE_EVENT_UEI Event.

Parameters:
serviceId - String is used to define a polling package and a service name in that polling package.
retries - int number of retries for this service
timeout - int time in milliseconds to wait during each retries
interval - int the standard polling interval in milliseconds
downTimeInterval - int the downtime polling interval in milliseconds(downtime model)
downTimeDuration - int the amount of time in milliseconds the downtime polling interval is in effect
username - String the user to pass to the JDBC connection
password - String the password to pass to the JDBC connection
driver - String the fully qualified name of the JDBC Driver class
url - String the url used to make a JDBC connection to the database
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges

getServiceConfiguration

Map getServiceConfiguration(String pkName,
                            String serviceId)
Returns an XML-RPC compatible hash map representing the current configuration (see addService params) for the matching String serviceId When a service is defined using XML-RPC, the package name and the service name will be the same.

Parameters:
pkName - Name of the polling package i.e. "default" or custom package "FastHTTP"
serviceId - Name of the service, i.e. "ICMP" or a custom service "FastHTTP"
Returns:
Always returns true.
Throws:
IllegalArgumentException - when arguments are outside of ranges


Copyright © 2009. All Rights Reserved.