Package com.verisign.epp.codec.host
Class EPPHostAddress
java.lang.Object
com.verisign.epp.codec.host.EPPHostAddress
- All Implemented Interfaces:
EPPCodecComponent,Serializable,Cloneable
Represents a host address specified in an
EPPHostCreateCmd or in an
EPPHostAddRemove object of an EPPHostUpdateCmd. An address
consists of a name and a type, where type is either
EPPHostAddress.IPV4 or EPPHostAddress.IPV6. The default type
is EPPHostAddress.IPV4.- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor forEPPHostAddress.EPPHostAddress(String aName) Constructor forEPPHostAddressthat the takes the string name of the IP address with the type set toIPV4.EPPHostAddress(String aName, short aType) Constructor forEPPHostAddressthat the takes the string name of the IP address along with the type of the IP address using either the constantEPPHostAddress.IPV4orEPPHostAddress.IPV6.EPPHostAddress(String aRootNS, String aRootName, String aName) Constructor forEPPHostAddressthat the takes the string name of an IPV4 IP address and the root tag to use.EPPHostAddress(String aRootNS, String aRootName, String aName, short aType) Constructor forEPPHostAddressthat the takes the string name of an IPV4 or IPV6 IP address and the root tag to use. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPHostAddress.voidDecode theEPPHostAddressattributes from the aElement DOM Element tree.Encode a DOM Element tree from the attributes of theEPPHostAddressinstance.booleanimplements a deepEPPHostAddresscompare.getName()Gets the addresss name in the format specified bygetType.Returns the XML namespace associated with theEPPCodecComponent.Get root name such as domain.Gets the root element XML namespace URI.shortgetType()Gets the type of the address name, which should be either theEPPHostAddress.IPV4or theEPPHostAddress.IPV6constant.voidSets the address name in the format specified bysetType.voidSets the address name and address type.voidsetRootName(String aRootNS, String aRootName) Set root name such as domain.voidsetType(short aType) Sets the type of the address name to either theEPPHostAddress.IPV4or theEPPHostAddress.IPV6constant.toString()Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent.
-
Field Details
-
IPV4
public static final short IPV4IPV4 IP address constant. This is the default type.- See Also:
-
IPV6
public static final short IPV6IPV6 IP address constant.- See Also:
-
ELM_NAME
XML Element Name ofEPPHostAddressroot element.- See Also:
-
ATTR_IPV6
IPV6 IP address constant.- See Also:
-
-
Constructor Details
-
EPPHostAddress
public EPPHostAddress()Default constructor forEPPHostAddress. The name attribute defaults tonulland must be set usingsetNamebefore invokingencode. The type defaults to IPV4. -
EPPHostAddress
Constructor forEPPHostAddressthat the takes the string name of the IP address with the type set toIPV4.- Parameters:
aName- IP address name.
-
EPPHostAddress
Constructor forEPPHostAddressthat the takes the string name of the IP address along with the type of the IP address using either the constantEPPHostAddress.IPV4orEPPHostAddress.IPV6.- Parameters:
aName- IP address name.aType-EPPHostAddress.IPV4orEPPHostAddress.IPV6constant.
-
EPPHostAddress
Constructor forEPPHostAddressthat the takes the string name of an IPV4 IP address and the root tag to use. This constructor is useful for other mappings like domain.- Parameters:
aRootNS- Root element namespace URIaRootName- Root tag for the elementaName- IP address name in IPV4 format.
-
EPPHostAddress
Constructor forEPPHostAddressthat the takes the string name of an IPV4 or IPV6 IP address and the root tag to use. This constructor is useful for other mappings like domain.- Parameters:
aRootNS- Root element namespace URIaRootName- Root tag for the elementaName- IP address name in IPV4 format.aType-EPPHostAddress.IPV4orEPPHostAddress.IPV6constant.
-
-
Method Details
-
getRootNS
Gets the root element XML namespace URI.- Returns:
- root element XML namespace URI
-
getRootName
Get root name such as domain.- Returns:
- Root element tag to use
-
setRootName
Set root name such as domain.- Parameters:
aRootNS- Root element namespace URIaRootName- Root element tag to use
-
getName
Gets the addresss name in the format specified bygetType.- Returns:
- Address name
Stringinstance if defined;nullotherwise.
-
setName
Sets the address name in the format specified bysetType.- Parameters:
aName- address name
-
setName
Sets the address name and address type.aTypeshould be eitherEPPHostAddress.IPV4orEPPHostAddress.IPV6, and the address name should conform to the format of the type.- Parameters:
aName- address nameaType- address type ((EPPHostAddress.IPV4orEPPHostAddress.IPV6)
-
getType
public short getType()Gets the type of the address name, which should be either theEPPHostAddress.IPV4or theEPPHostAddress.IPV6constant.- Returns:
- Type of the address (
EPPHostAddress.IPV4orEPPHostAddress.IPV6)
-
setType
public void setType(short aType) Sets the type of the address name to either theEPPHostAddress.IPV4or theEPPHostAddress.IPV6constant.- Parameters:
aType-IPV4orIPV6
-
encode
Encode a DOM Element tree from the attributes of theEPPHostAddressinstance.- Specified by:
encodein interfaceEPPCodecComponent- Parameters:
aDocument- DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPHostAddressinstance. - Throws:
EPPEncodeException- Unable to encodeEPPHostAddressinstance.
-
decode
Decode theEPPHostAddressattributes from the aElement DOM Element tree.- Specified by:
decodein interfaceEPPCodecComponent- Parameters:
aElement- Root DOM Element to decodeEPPHostAddressfrom.- Throws:
EPPDecodeException- Unable to decode aElement.
-
equals
implements a deepEPPHostAddresscompare. -
clone
CloneEPPHostAddress.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classObject- Returns:
- clone of
EPPHostAddress - Throws:
CloneNotSupportedException- standard Object.clone exception
-
toString
Implementation ofObject.toString, which will result in an indented XMLStringrepresentation of the concreteEPPCodecComponent. -
getNamespace
Returns the XML namespace associated with theEPPCodecComponent.- Specified by:
getNamespacein interfaceEPPCodecComponent- Returns:
- XML namespace for the
EPPCodecComponent.
-