SiteMinder
Java SDK r12.51


com.netegrity.sdk.policyapi
Class SmIPAddress

java.lang.Object
  extended by com.netegrity.sdk.policyapi.SmIPAddress

public final class SmIPAddress
extends java.lang.Object

Specifies the Internet Protocol (IP) address that must be in use for a rule or policy to fire.

Since:
SDK 2.0

Field Summary
static int HOSTNAME
          Constant to indicate that the type of IP address restriction is a hostname.
static int IPADDRESS
          Constant to indicate that the type of IP address restriction is a single host IP address.
static int IPRANGE
          Constant to indicate that the type of IP address restriction is a range of IP addresses.
static int SUBNET
          Constant to indicate that the type of IP address restriction is a subnet mask.
static int SUBNETBITS
          Constant to specify the subnet mask restriction.
 
Constructor Summary
SmIPAddress()
          Constructs an IP address restriction object.
SmIPAddress(int mode)
          Constructs an IP address restriction object with the specified restriction type.
 
Method Summary
 java.lang.String getEndIPAddress()
          Gets the ending IP address on which a restriction has been placed.
 java.lang.String getHostName()
          Gets the host name of the machine that must be in use for the rule or policy to fire.
 java.lang.String getIPAddress()
          Gets the IP address on which the restriction has been placed.
 int getIPMode()
          Gets the type of IP address restriction.
 int getSubnetBits()
          Gets the number of bits in the subnet on which the restriction is enforced.
 void setEndIPAddress(java.lang.String endAddress)
          Sets the ending IP address on which the restriction is to be placed.
 void setHostname(java.lang.String hostname)
          Specifies the host name of the machine that must be in use for the rule or policy to fire.
 void setIPAddress(java.lang.String address)
          Sets the IP address on which the restriction is to be placed.
 void setIPMode(int mode)
          Sets the type of IP address restriction.
 void setSubnetBits(int subnetBits)
          Specifies the number of bits in the subnet on which the restriction is enforced.
 boolean validateIPAddress(java.lang.String address)
          Validates the IP address on which the restriction is to be placed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPADDRESS

public static final int IPADDRESS
Constant to indicate that the type of IP address restriction is a single host IP address.

See Also:
Constant Field Values

IPRANGE

public static final int IPRANGE
Constant to indicate that the type of IP address restriction is a range of IP addresses.

See Also:
Constant Field Values

SUBNET

public static final int SUBNET
Constant to indicate that the type of IP address restriction is a subnet mask.

See Also:
Constant Field Values

HOSTNAME

public static final int HOSTNAME
Constant to indicate that the type of IP address restriction is a hostname.

See Also:
Constant Field Values

SUBNETBITS

public static final int SUBNETBITS
Constant to specify the subnet mask restriction.

See Also:
Constant Field Values
Constructor Detail

SmIPAddress

public SmIPAddress()
Constructs an IP address restriction object.


SmIPAddress

public SmIPAddress(int mode)
            throws SmApiException
Constructs an IP address restriction object with the specified restriction type.

Parameters:
mode - The type of IP address restriction.
Throws:
SmApiException
Method Detail

setIPMode

public void setIPMode(int mode)
               throws SmApiException
Sets the type of IP address restriction.

Parameters:
mode - The type of IP address restriction.
Throws:
SmApiException - Occurs when the IP address type is invalid. SmApiResult will be set to SmApiResult.POLICY_INVALID_ADDRESS_MODE.

getIPMode

public int getIPMode()
Gets the type of IP address restriction.

Returns:
The type of IP address restriction.

setIPAddress

public void setIPAddress(java.lang.String address)
                  throws SmApiException
Sets the IP address on which the restriction is to be placed. This IP address will also be the starting address for the type IPRANGE.

Parameters:
address - The IP address.
Throws:
SmApiException - Occurs when the IP address is invalid. SmApiResult will be set to SmApiResult.POLICY_INVALID_ADDRESS.

getIPAddress

public java.lang.String getIPAddress()
Gets the IP address on which the restriction has been placed. This IP address will also be the starting address for the type IPRANGE.

Returns:
The IP address.

setEndIPAddress

public void setEndIPAddress(java.lang.String endAddress)
                     throws SmApiException
Sets the ending IP address on which the restriction is to be placed. This IP address is applicable to the IP restriction type IPRANGE.

Parameters:
endAddress - The ending IP address.
Throws:
SmApiException - Occurs when the ending IP address is invalid. SmApiResult will be set to SmApiResult.POLICY_INVALID_ADDRESS.

getEndIPAddress

public java.lang.String getEndIPAddress()
Gets the ending IP address on which a restriction has been placed. This IP address is applicable to the IP restriction type IPRANGE.

Returns:
The ending IP address.

setSubnetBits

public void setSubnetBits(int subnetBits)

Specifies the number of bits in the subnet on which the restriction is enforced.

The subnet mask value is a number of bits. To arrive at this value, count the bits in the binary value of the address. For example, suppose the subnet mask is 255.255.255.128. The binary format is:

11111111 11111111 11111111 10000000

Counting from left to right, the number to pass in this method would be 25.

Parameters:
subnetBits - The number of bits in the subnet.

getSubnetBits

public int getSubnetBits()
Gets the number of bits in the subnet on which the restriction is enforced.

Returns:
The number of bits in the subnet.
See Also:
setSubnetBits()

setHostname

public void setHostname(java.lang.String hostname)
Specifies the host name of the machine that must be in use for the rule or policy to fire.

Parameters:
hostname - The host name of the machine.

getHostName

public java.lang.String getHostName()
Gets the host name of the machine that must be in use for the rule or policy to fire.

Returns:
The host name of the machine.

validateIPAddress

public boolean validateIPAddress(java.lang.String address)
Validates the IP address on which the restriction is to be placed. Returns true if IP address is valid.

Parameters:
address - The IP address.
Returns:
true if IP address is valid.

SiteMinder
Java SDK r12.51

Mon 04/08/2013

http://ca.com
Copyright (c) 2013 CA.