Skip Headers
Oracle® Communications Network Integrity Developer's Guide
Release 7.1

E23701-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

13 Working with Address Handlers

Discovery action scans are often used to scan multiple devices in the network. A discovery action scan can use a variety of protocols to perform a scan. To facilitate scan processing, Network Integrity supports an address expansion and validation software component called an address handler. Address handlers perform two functions.

Discovery actions can optionally specify an address handler to use. It is best practice to create an address handler whenever address validation is desired. Addresses are validated when a scan configuration for the discovery action is saved, and also when the scan is run.

In addition, address strings representing multiple addresses are expanded into a collection of addresses when the scan runs. When an address string is expanded into multiple addresses, Network Integrity calls into the Discovery Action multiple times until each individual address has been scanned. The scanning of multiple addresses is done in parallel.

Address handlers are defined in Design Studio for Network Integrity. Design Studio for Network Integrity generates some artifacts for the address handlers. However, the user needs to supply implementation code to complete the address handler.

Address handlers become stateless session beans in the run-time environment. Cartridges containing an address handler can easily be deployed using Studio or the Oracle Cartridge Deployer tool.

Note:

Address handlers cannot be created in the same cartridge as actions.

Network Integrity delivers an IP Address handler and a URL Address handler with the following cartridges:

Creating Address Handlers

This section describes how to create an address handler.

To create an address handler:

  1. Select New from the Studio menu, then select Integrity, then select Address Handler.

    The Address Handler Wizard appears.

  2. In the Project field, select the name of the project that includes the new address handler. The currently selected project appears by default.

  3. The Type field lists the data type; Address Handler.

  4. In the Name field, enter a name for the new address handler. This is the name that appears in Network Integrity.

    When you define an address handler name, you must ensure that the name does not:

    • Contain special characters

    • Contain javascript reserved keywords

    • Start with a numeral

    For information about defining address handler names, see the following Web page:

    http://www.informit.com/articles/article.aspx?p=131025&seqNum=3

  5. In the Folder field, select a location for the address handler. If you leave the Folder field blank, the specification is created in the default location.

  6. The Implementation Prefix field is a read-only field which is set automatically to a value which is derived from the address handler name.

  7. Click Finish.

    Studio creates the new address handler and displays it in the Address Handler editor.

Specifying the Address Handler Implementation

You must specify the implementation class for an address handler.

You do this from the Address Handler editor by doing one of the following:

  • From the Details page, click Select to choose an existing class for the element implementation.

    In the Select Java Implementation page, enter the type name and matching items, and click OK.

  • Create the implementation class by selecting the Implementation Class link.

About the Address Handler Interface

Address Handlers must implement the AddressHandler interface which is shown and described in the following section:

package oracle.communications.integrity.api;
 
import java.util.List;
import oracle.communications.integrity.common.AddressHandlerException;
import oracle.communications.integrity.common.AddressesStatus;
 
/**
 * AddressHandler is common interface which should be implemented by the
 * class implementing the Address expansion and validation of addresses.
 */
public interface AddressHandler {
 
    /**
     * This method expands the list of address or addressRange provided.
     * @param addressRangeList - a list of String representing either an address or an address range
     * @return List - a list of Strings each of which represents an individual address 
     * @throws AddressHandlerException
     */
     public List<String> expandAddressRange(List<String> addressRangeList) throws AddressHandlerException;
 
    /**
     * This method validates the list of address provided.
     * @param address
     * @return AddressesStatus
     * @throws AddressHandlerException
     */
     public AddressesStatus validate(List<String> address) throws AddressHandlerException;
 
     /**
     * This method validates the single address provided.
     * @param address
     * @return boolean
     * @throws AddressHandlerException
     */
     public boolean validate(String address) throws AddressHandlerException;
 
     /**
     * This method is used to count the number of addresses after expansion of address parameter passed.
     * Here maxCountLimit can be NULL. If maxCountLimit is NULL, method return the total count of expanded address.
     * If maxCountLimit is specified, method does not count the expanded address
     * beyound that limit and returns the maxCountLimit + 1.
     * @param addressRangeList
     * @param maxCountLimit
     * @return int
     * @throws AddressHandlerException
     */
     public int countExpandedAddresses(List<String> addressRangeList, Integer maxCountLimit) throws AddressHandlerException;
}

About the Address_Handlers Cartridge

Network Integrity provides a cartridge called Address_Handlers which implements the following address handlers:

  • IPAddressHandler validates and expands both IPv4 and IPv6 address.

    It validates and expands the following IP address formats:

    • Single IP addresses; for example: 10.156.67.123

    • IP address ranges using ”-”; for example: 10.156.67.10-125

    • IP address ranges using ”*”; for example: 10.156.67.*, equal to 10.156.67.0-255

    • IP addresses using Classless Inter-Domain Routing (CIDR); for example: 10.156.67.0/24

  • URLAddressHandler validates URL syntax addresses.

  • File TransferAddressHandler validates addresses and paths used by the File Transfer processor, as follows.

    • allows the field to contain one or two tokens delimited by "/"

    • using a single token identifies:

      • the absolute path to files that are local to the Network Integrity server, for example: /tmp

    • using two tokens identifies:

      • the remote location and absolute path

      • host_name/path, for example: someserver.us.com/tmp/test

      • IPV4Address/path, for example: 10.156.58.63/tmp/test

      • IPV6Address/path

    • validates the proper format of IPV4 and IPV6Address

Note:

The File Transfer processor does not support address expansion and relative paths.
  • Corba URLAddressHandler validates that the address entered in Network Integrity is a properly formatted IPv4 or IPv6 CorbaLoc URL. For more information, see Network Integrity CORBA Cartridge Guide.