Class EPPHostCheckResp

java.lang.Object
com.verisign.epp.codec.gen.EPPResponse
com.verisign.epp.codec.host.EPPHostCheckResp
All Implemented Interfaces:
EPPCodecComponent, EPPMessage, Serializable, Cloneable

public class EPPHostCheckResp extends EPPResponse
Represents an EPP Host <host:chkData> response to a EPPHostCheckCmd. When a <check> command has been processed successfully, the EPP <resData> element MUST contain a child <host:chkData> element that identifies the host namespace and the location of the host schema. The <host:chkData> element contains one or more <host:cd> elements that contain the following child elements:
  • A <host:name> element that contains the fully qualified name of the queried host object. This element MUST contain an "avail" attribute whose value indicates object availability at the moment the <check> command was completed. A value of "1" or "true" menas that the object is availabe. A value of "0" or "false" means that the object is not available.
  • An OPTIONAL <host:reason> element that MAY be provided when an object is not available for provisioning. If present, this element contains server-specific text to help explain why the object is unavailable. This text MUST be represented in the response language previously negotiated with the client; an OPTIONAL "lang" attribute MAY be present to identify the language if the negotiated value is something other that a default value of "en" (English). Use getCheckResults and setCheckResults to get and set the elements.
See Also:
  • Field Details

  • Constructor Details

    • EPPHostCheckResp

      public EPPHostCheckResp()
      EPPHostCheckResp default constructor. It will set results attribute to an empty Vector.
    • EPPHostCheckResp

      public EPPHostCheckResp(EPPTransId aTransId, EPPHostCheckResult aResult)
      EPPHostCheckResp constructor that will set the result of an individual host.
      Parameters:
      aTransId - Transaction Id associated with response.
      aResult - Result of a single host name.
    • EPPHostCheckResp

      public EPPHostCheckResp(EPPTransId aTransId, Vector<EPPHostCheckResult> aResults)
      EPPHostCheckResp constructor that will set the result of multiple hosts.
      Parameters:
      aTransId - Transaction Id associated with response.
      aResults - Vector of EPPCheckHostResult instances.
  • Method Details

    • getType

      public String getType()
      Get the EPP response type associated with EPPHostCheckResp.
      Overrides:
      getType in class EPPResponse
      Returns:
      EPPHostCheckResp.ELM_NAME
    • getNamespace

      public String getNamespace()
      Get the EPP command Namespace associated with EPPHostCheckResp.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Specified by:
      getNamespace in interface EPPMessage
      Overrides:
      getNamespace in class EPPResponse
      Returns:
      EPPHostMapFactory.NS
    • doEncode

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

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

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

      public Object clone() throws CloneNotSupportedException
      Clone EPPHostCheckResp.
      Specified by:
      clone in interface EPPCodecComponent
      Overrides:
      clone in class EPPResponse
      Returns:
      clone of EPPHostCheckResp
      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 EPPResponse
      Returns:
      Indented XML String if successful; ERROR otherwise.
    • setCheckResults

      public void setCheckResults(Vector<EPPHostCheckResult> aResults)
      Set the results of a EPPHostCheckResp Response. There is one EPPCheckHostResult instance in someResults for each host requested in the EPPHostCheckCmd Command.
      Parameters:
      aResults - Vector of EPPHostCheckResult instances.
    • getCheckResults

      public Vector<EPPHostCheckResult> getCheckResults()
      Get the results of a EPPHostCheckResp Response. There is one EPPCheckHostResult instance in someResults for each host requested in the EPPCheckHostResult Command.
      Returns:
      Vector of EPPHostResult instances.