Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.verisign.epp.codec.suggestion
Class EPPSuggestionAddress

    java.lang.Object
      com.verisign.epp.codec.suggestion.EPPSuggestionAddress

All Implemented Interfaces:
  EPPCodecComponent, java.io.Serializable, java.lang.Cloneable

    public class EPPSuggestionAddress

extends java.lang.Object
implements EPPCodecComponent

Represents a client address specified in an `EPPSuggestionCoordinates` object of an `EPPSuggestionGeo`. An address consists of a name and a type, where type is either `EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`. The default type is `EPPSuggestionAddress.IPV6`.

Version:
  $Revision: 1.4 $
Author:
  $Author: jim $
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATTR_IPV6` IPV6 IP address constant.
`static short` | `IPV4` IPV4 IP address constant.
`static short` | `IPV6` IPV6 IP address constant.

Constructor Summary
`EPPSuggestionAddress()` Default constructor for `EPPSuggestionAddress`.
`EPPSuggestionAddress(java.lang.String aName)` Constructor for `EPPSuggestionAddress` that the takes the string name of the IP address with the type set to `IPV4`.
`EPPSuggestionAddress(java.lang.String aName, short aType)` Constructor for `EPPSuggestionAddress` that the takes the string name of the IP address along with the type of the IP address using either the constant `EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`.

Method Summary
`java.lang.Object` | `clone()` clone an `EPPCodecComponent`.
`void` | `decode(org.w3c.dom.Element aElement)` decode a DOM element tree to initialize the instance attributes.
`org.w3c.dom.Element` | `encode(org.w3c.dom.Document aDocument)` encode instance into a DOM element tree.
`boolean` | `equals(java.lang.Object aObject)`
`java.lang.String` | `getName()` Gets the addresss name in the format specified by `getType`.
`short` | `getType()` Gets the type of the address name, which should be either the `EPPSuggestionAddress.IPV4` or the `EPPSuggestionAddress.IPV6` constant.
`void` | `setName(java.lang.String aName)` Sets the address name in the format specified by `setType`.
`void` | `setName(java.lang.String aName, short aType)` Sets the address name and address type.
`void` | `setType(short aType)` Sets the type of the address name to either the `EPPSuggestionAddress.IPV4` or the `EPPSuggestionAddress.IPV6` constant.
`java.lang.String` | `toLogString()` Address as string for log purpose.
`java.lang.String` | `toString()` Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

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

Field Detail

### IPV4

    public static final short IPV4

  IPV4 IP address constant. This is the default type.

  See Also:
    Constant Field Values

### IPV6

    public static final short IPV6

  IPV6 IP address constant.

  See Also:
    Constant Field Values

### ATTR_IPV6

    public static final java.lang.String ATTR_IPV6

  IPV6 IP address constant.

  See Also:
    Constant Field Values

Constructor Detail

### EPPSuggestionAddress

    public EPPSuggestionAddress()

  Default constructor for `EPPSuggestionAddress`. The name attribute defaults to `null` and must be set using `setName` before invoking `encode`. The type defaults to IPV4.

### EPPSuggestionAddress

    public EPPSuggestionAddress(java.lang.String aName)

  Constructor for `EPPSuggestionAddress` that the takes the string name of the IP address with the type set to `IPV4`.

  Parameters:
    `aName` - IP address name.

### EPPSuggestionAddress

    public EPPSuggestionAddress(java.lang.String aName,
                                short aType)

  Constructor for `EPPSuggestionAddress` that the takes the string name of the IP address along with the type of the IP address using either the constant `EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`.

  Parameters:
    `aName` - IP address name.
    `aType` - `EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6` constant.

Method Detail

### getName

    public java.lang.String getName()

  Gets the addresss name in the format specified by `getType`.

  Returns:
    Address name `String` instance if defined; `null` otherwise.

### setName

    public void setName(java.lang.String aName)

  Sets the address name in the format specified by `setType`.

  Parameters:
    `aName` - address name

### setName

    public void setName(java.lang.String aName,
                        short aType)

  Sets the address name and address type. `aType` should be either `EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`, and the address name should conform to the format of the type.

  Parameters:
    `aName` - address name
    `aType` - address type ((`EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`)

### getType

    public short getType()

  Gets the type of the address name, which should be either the `EPPSuggestionAddress.IPV4` or the `EPPSuggestionAddress.IPV6` constant.

  Returns:
    Type of the address (`EPPSuggestionAddress.IPV4` or `EPPSuggestionAddress.IPV6`)

### setType

    public void setType(short aType)

  Sets the type of the address name to either the `EPPSuggestionAddress.IPV4` or the `EPPSuggestionAddress.IPV6` constant.

  Parameters:
    `aType` - `IPV4` or `IPV6`

### toLogString

    public java.lang.String toLogString()

  Address as string for log purpose.

  Returns:
    a string

### encode

    public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument)
                               throws EPPEncodeException

  Description copied from interface: `EPPCodecComponent`
  encode instance into a DOM element tree. A DOM Document is passed as an argument and functions as a factory for DOM objects. The root element associated with the instance is created and each instance attribute is appended as a child node.
  For example, the <command> element of `EPPCommand` is created and is used to append the attribute nodes of `EPPCommand`.

  Specified by:
    `encode` in interface `EPPCodecComponent`
  Parameters:
    `aDocument` - DOM document used as a factory of DOM objects.
  Returns:
    instance root DOM element along with attribute child nodes.
  Throws:
    `EPPEncodeException` - Error encoding the DOM element tree.

### decode

    public void decode(org.w3c.dom.Element aElement)
                throws EPPDecodeException

  Description copied from interface: `EPPCodecComponent`
  decode a DOM element tree to initialize the instance attributes. The `aElement` argument represents the root DOM element and is used to traverse the DOM nodes for instance attribute values.
  For example, the <command> element of `EPPCommand` is passed into `decode` of EPPCommand to be decoded and used to set the instance attributes.

  Specified by:
    `decode` in interface `EPPCodecComponent`
  Parameters:
    `aElement` - root DOM element associated with instance
  Throws:
    `EPPDecodeException` - Error decoding the DOM element tree.

### equals

    public boolean equals(java.lang.Object aObject)

  Overrides:
    `equals` in class `java.lang.Object`

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Description copied from interface: `EPPCodecComponent`
  clone an `EPPCodecComponent`.

  Specified by:
    `clone` in interface `EPPCodecComponent`
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    clone of concrete `EPPCodecComponent`
  Throws:
    `java.lang.CloneNotSupportedException` - standard Object.clone exception

### toString

    public java.lang.String toString()

  Implementation of `Object.toString`, which will result in an indented XML `String` representation of the concrete `EPPCodecComponent`.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    Indented XML `String` if successful; `ERROR` otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.