Class EPPHostCheckCmd

All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPHostCheckCmd extends EPPCheckCmd
Represents an EPP Host <check> command, which is used to determine if a host name is known to the server. The <host:check> element MUST contain the following child elements:

  • One or more <host:name> elements that contain the fully qualified name of the queried hosts. Use getNames and setNames to get and set the elements. Use setNames to set an individual name.


EPPHostCheckResp is the concrete EPPReponse associated with EPPHostCheckCmd.

See Also:
  • Field Details

  • Constructor Details

    • EPPHostCheckCmd

      public EPPHostCheckCmd()
      EPPHostCheckCmd default constructor. It will set the names attribute to an empty Vector.
    • EPPHostCheckCmd

      public EPPHostCheckCmd(String aTransId, String aName)
      EPPHostCheckCmd constructor that will check an individual host name.
      Parameters:
      aTransId - Transaction Id associated with command.
      aName - Host name to check
    • EPPHostCheckCmd

      public EPPHostCheckCmd(String aTransId, Vector<String> aNames)
      EPPHostCheckCmd constructor that will check a list of host names.
      Parameters:
      aTransId - Transaction Id associated with command.
      aNames - Vector of host name String instances.
  • Method Details

    • getNamespace

      public String getNamespace()
      Gets the EPP command Namespace associated with EPPHostCheckCmd.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Specified by:
      getNamespace in class EPPCommand
      Returns:
      EPPHostMapFactory.NS
    • getKey

      public String getKey()
      Gets the key for the host object, which is the host name.
      Overrides:
      getKey in class EPPCommand
      Returns:
      The host name if set with a single value; null otherwise.
    • doEncode

      protected Element doEncode(Document aDocument) throws EPPEncodeException
      Encode a DOM Element tree from the attributes of the EPPHostCheckCmd instance.
      Specified by:
      doEncode in class EPPCheckCmd
      Parameters:
      aDocument - DOM Document that is being built. Used as an Element factory.
      Returns:
      Element Root DOM Element representing the EPPHostCheckCmd instance.
      Throws:
      EPPEncodeException - Unable to encode EPPHostCheckCmd instance.
    • doDecode

      protected void doDecode(Element aElement) throws EPPDecodeException
      Decode the EPPHostCheckCmd attributes from the aElement DOM Element tree.
      Specified by:
      doDecode in class EPPCheckCmd
      Parameters:
      aElement - Root DOM Element to decode EPPHostCheckCmd from.
      Throws:
      EPPDecodeException - Unable to decode aElement
    • equals

      public boolean equals(Object aObject)
      Compare an instance of EPPHostCheckCmd with this instance.
      Overrides:
      equals in class EPPCheckCmd
      Parameters:
      aObject - Object to compare with.
      Returns:
      true if equal; false otherwise
    • clone

      public Object clone() throws CloneNotSupportedException
      Clone EPPHostCheckCmd.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPCommand
      Returns:
      clone of EPPHostCheckCmd
      Throws:
      CloneNotSupportedException - standard Object.clone exception
    • toString

      public String toString()
      Implementation of Object.toString, which will result in an indented XML String representation of the concrete EPPCodecComponent.
      Overrides:
      toString in class EPPCommand
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • setName

      public void setName(String aName)
      Sets host name to check.
      Parameters:
      aName - Name to check.
    • getNames

      public Vector<String> getNames()
      Gets host names to check.
      Returns:
      Vector of host name String's.
    • setNames

      public void setNames(Vector<String> aNames)
      Sets host names to check.
      Parameters:
      aNames - Names to check.