Class EPPMsgQueue

java.lang.Object
com.verisign.epp.codec.gen.EPPMsgQueue
All Implemented Interfaces:
EPPCodecComponent, Serializable, Cloneable

public class EPPMsgQueue extends Object implements EPPCodecComponent
EPPMsgQueue describes messages queued for client retrieval. A <msgQ> element MUST NOT be present if there are no messages queued for client retrieval. A <msgQ> element MAY be present in responses to EPP commands other than the <pol> command if messages are queued for retrieval. A <msgQ> element MUST be present in responses to the EPP <poll> command if messages are queued for retrieval. The <msgQ> element contains the following attributes:

  • A "count" attribute that describes the number of messages that exist in the queue.
  • An "id" attribute used to uniquely identify the message at the head of the queue.
The <msgQ> element contains the following OPTIONAL child elements that MUST be returned in response to a <poll> request command and MUST NOT be returned in response to any other command, including a <poll> acknowledgement:

  • A <qDate> element that contains the date and time that the message was enqueued.
  • A <msg> element containing a human-readable message. The language of the response is identified via an OPTIONAL "lang" attribute. If not specified, the default attribute value MUST be "en" (English). This element MAY contain XML content for formatting purposes, but the XML content is not specified by the protocol and will thus not be processed for validity.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default language of the reason "en".
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor required for serialization.
    EPPMsgQueue(Long aCount, String aId)
    Allocates a new EPPMsgQueue with the required attributes.
    EPPMsgQueue(Long aCount, String aId, Date aQDate, String aMsg)
    Allocates a new EPPMsgQueue with all of the attributes.
    EPPMsgQueue(Long aCount, String aId, Date aQDate, NodeList aMsgNodeList)
    Allocates a new EPPMsgQueue with all of the attributes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Clone EPPMsgQueue.
    void
    decode(Element aElement)
    decode EPPMsgQueue from a DOM element tree.
    encode(Document aDocument)
    encode EPPMsgQueue into a DOM element tree.
    boolean
    equals(Object aObject)
    implements a deep EPPMsgQueue compare.
    Gets the number of messages that exist in the queue.
    Gets the id that uniquely identifies the message at the head of the queue.
    Gets the message language.
    Gets the optional human-readable message.
    Gets the message DOM NodeList representing mixed XML content for the message.
    Returns the XML namespace associated with the EPPCodecComponent.
    Gets the optional date and time that the message was enqueued.
    void
    setCount(Long aCount)
    Sets the number of messages that exist in the queue.
    void
    Gets the id that uniquely identifies the message at the head of the queue.
    void
    setLang(String aLang)
    Sets the message language.
    void
    setMsg(String aMsg)
    Sets the optional human-readable message.
    void
    setMsgNodeList(NodeList aMsgNodeList)
    Sets the message DOM NodeList representing mixed XML content for the message.
    void
    setQDate(Date aDate)
    Sets the optional date and time that the message was enqueued.
    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 Details

  • Constructor Details

    • EPPMsgQueue

      public EPPMsgQueue()
      Default constructor required for serialization. The count and id attributes must be set before calling encode.
    • EPPMsgQueue

      public EPPMsgQueue(Long aCount, String aId)
      Allocates a new EPPMsgQueue with the required attributes. The optional attributes are initialized to null.
      Parameters:
      aCount - The number of messages that exist in the queue
      aId - uniquely identify the message at the head of the queue
    • EPPMsgQueue

      public EPPMsgQueue(Long aCount, String aId, Date aQDate, String aMsg)
      Allocates a new EPPMsgQueue with all of the attributes.
      Parameters:
      aCount - The number of messages that exist in the queue
      aId - uniquely identify the message at the head of the queue
      aQDate - date and time that the message was enqueued
      aMsg - human-readable message. The language defaults to DEFAULT_LANG, but can be set with setLang(String).
    • EPPMsgQueue

      public EPPMsgQueue(Long aCount, String aId, Date aQDate, NodeList aMsgNodeList)
      Allocates a new EPPMsgQueue with all of the attributes.
      Parameters:
      aCount - The number of messages that exist in the queue
      aId - uniquely identify the message at the head of the queue
      aQDate - date and time that the message was enqueued
      aMsgNodeList - Mixed XML content for the message.
  • Method Details

    • getCount

      public Long getCount()
      Gets the number of messages that exist in the queue.
      Returns:
      Number of messages in the queue
    • setCount

      public void setCount(Long aCount)
      Sets the number of messages that exist in the queue.
      Parameters:
      aCount - Number of messages in the queue
    • getId

      public String getId()
      Gets the id that uniquely identifies the message at the head of the queue.
      Returns:
      id for message
    • setId

      public void setId(String aId)
      Gets the id that uniquely identifies the message at the head of the queue.
      Parameters:
      aId - Message id
    • getQDate

      public Date getQDate()
      Gets the optional date and time that the message was enqueued.
      Returns:
      Date and time that the message was enqueued if defined; null otherwise.
    • setQDate

      public void setQDate(Date aDate)
      Sets the optional date and time that the message was enqueued.
      Parameters:
      aDate - The date and time that the message was enqueued
    • getLang

      public String getLang()
      Gets the message language. The Language must be structured as documented in [RFC1766].
      Returns:
      Language of the message, with the default of DEFAULT_LANG.
    • setLang

      public void setLang(String aLang)
      Sets the message language. The Language must be structured as documented in [RFC1766].
      Parameters:
      aLang - Language of the message.
    • getMsg

      public String getMsg()
      Gets the optional human-readable message. The language defaults to DEFAULT_LANG, but the value can be retrieved with the getLang() method.
      Returns:
      the human-readable message if defined; null otherwise.
    • setMsg

      public void setMsg(String aMsg)
      Sets the optional human-readable message. The language defaults to DEFAULT_LANG, but can be set with the setLang(String) method.
      Parameters:
      aMsg - human-readable message
    • getMsgNodeList

      public NodeList getMsgNodeList()
      Gets the message DOM NodeList representing mixed XML content for the message. This is an alternative to using a simple String for the message.
      Returns:
      Message NodeList if defined;null otherwise
    • setMsgNodeList

      public void setMsgNodeList(NodeList aMsgNodeList)
      Sets the message DOM NodeList representing mixed XML content for the message. This is an alternative to using a simple String for the message.
      Parameters:
      aMsgNodeList - NodeList containing mixed XML content
    • encode

      public Element encode(Document aDocument) throws EPPEncodeException
      encode EPPMsgQueue into a DOM element tree.
      Specified by:
      encode in interface EPPCodecComponent
      Parameters:
      aDocument - Factory for DOM components
      Returns:
      <extValue> root element tree.
      Throws:
      EPPEncodeException - Error encoding the DOM element tree.
    • decode

      public void decode(Element aElement) throws EPPDecodeException
      decode EPPMsgQueue from a DOM element tree. The aElement argument needs to be the "extValue" element.
      Specified by:
      decode in interface EPPCodecComponent
      Parameters:
      aElement - The "extValue" XML element.
      Throws:
      EPPDecodeException - Error decoding the DOM element tree.
    • equals

      public boolean equals(Object aObject)
      implements a deep EPPMsgQueue compare.
      Overrides:
      equals in class Object
      Parameters:
      aObject - EPPMsgQueue instance to compare with
      Returns:
      true if equal; false otherwise
    • clone

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

      public String getNamespace()
      Returns the XML namespace associated with the EPPCodecComponent.
      Specified by:
      getNamespace in interface EPPCodecComponent
      Returns:
      XML namespace for the EPPCodecComponent.