Package com.verisign.epp.codec.gen
Class EPPMsgQueue
- java.lang.Object
-
- com.verisign.epp.codec.gen.EPPMsgQueue
-
- All Implemented Interfaces:
EPPCodecComponent
,java.io.Serializable
,java.lang.Cloneable
public class EPPMsgQueue extends java.lang.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.
- 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LANG
The default language of the reason "en".
-
Constructor Summary
Constructors Constructor Description EPPMsgQueue()
Default constructor required for serialization.EPPMsgQueue(java.lang.Long aCount, java.lang.String aId)
Allocates a newEPPMsgQueue
with the required attributes.EPPMsgQueue(java.lang.Long aCount, java.lang.String aId, java.util.Date aQDate, java.lang.String aMsg)
Allocates a newEPPMsgQueue
with all of the attributes.EPPMsgQueue(java.lang.Long aCount, java.lang.String aId, java.util.Date aQDate, org.w3c.dom.NodeList aMsgNodeList)
Allocates a newEPPMsgQueue
with all of the attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CloneEPPMsgQueue
.void
decode(org.w3c.dom.Element aElement)
decodeEPPMsgQueue
from a DOM element tree.org.w3c.dom.Element
encode(org.w3c.dom.Document aDocument)
encodeEPPMsgQueue
into a DOM element tree.boolean
equals(java.lang.Object aObject)
implements a deepEPPMsgQueue
compare.java.lang.Long
getCount()
Gets the number of messages that exist in the queue.java.lang.String
getId()
Gets the id that uniquely identifies the message at the head of the queue.java.lang.String
getLang()
Gets the message language.java.lang.String
getMsg()
Gets the optional human-readable message.org.w3c.dom.NodeList
getMsgNodeList()
Gets the message DOMNodeList
representing mixed XML content for the message.java.lang.String
getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.java.util.Date
getQDate()
Gets the optional date and time that the message was enqueued.void
setCount(java.lang.Long aCount)
Sets the number of messages that exist in the queue.void
setId(java.lang.String aId)
Gets the id that uniquely identifies the message at the head of the queue.void
setLang(java.lang.String aLang)
Sets the message language.void
setMsg(java.lang.String aMsg)
Sets the optional human-readable message.void
setMsgNodeList(org.w3c.dom.NodeList aMsgNodeList)
Sets the message DOMNodeList
representing mixed XML content for the message.void
setQDate(java.util.Date aDate)
Sets the optional date and time that the message was enqueued.java.lang.String
toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.
-
-
-
Field Detail
-
DEFAULT_LANG
public static final java.lang.String DEFAULT_LANG
The default language of the reason "en".- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EPPMsgQueue
public EPPMsgQueue()
Default constructor required for serialization. Thecount
andid
attributes must be set before callingencode
.
-
EPPMsgQueue
public EPPMsgQueue(java.lang.Long aCount, java.lang.String aId)
Allocates a newEPPMsgQueue
with the required attributes. The optional attributes are initialized tonull
.- Parameters:
aCount
- The number of messages that exist in the queueaId
- uniquely identify the message at the head of the queue
-
EPPMsgQueue
public EPPMsgQueue(java.lang.Long aCount, java.lang.String aId, java.util.Date aQDate, java.lang.String aMsg)
Allocates a newEPPMsgQueue
with all of the attributes.- Parameters:
aCount
- The number of messages that exist in the queueaId
- uniquely identify the message at the head of the queueaQDate
- date and time that the message was enqueuedaMsg
- human-readable message. The language defaults toDEFAULT_LANG
, but can be set withsetLang(String)
.
-
EPPMsgQueue
public EPPMsgQueue(java.lang.Long aCount, java.lang.String aId, java.util.Date aQDate, org.w3c.dom.NodeList aMsgNodeList)
Allocates a newEPPMsgQueue
with all of the attributes.- Parameters:
aCount
- The number of messages that exist in the queueaId
- uniquely identify the message at the head of the queueaQDate
- date and time that the message was enqueuedaMsgNodeList
- Mixed XML content for the message.
-
-
Method Detail
-
getCount
public java.lang.Long getCount()
Gets the number of messages that exist in the queue.- Returns:
- Number of messages in the queue
-
setCount
public void setCount(java.lang.Long aCount)
Sets the number of messages that exist in the queue.- Parameters:
aCount
- Number of messages in the queue
-
getId
public java.lang.String getId()
Gets the id that uniquely identifies the message at the head of the queue.- Returns:
- id for message
-
setId
public void setId(java.lang.String aId)
Gets the id that uniquely identifies the message at the head of the queue.- Parameters:
aId
- Message id
-
getQDate
public java.util.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(java.util.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 java.lang.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(java.lang.String aLang)
Sets the message language. The Language must be structured as documented in [RFC1766].- Parameters:
aLang
- Language of the message.
-
getMsg
public java.lang.String getMsg()
Gets the optional human-readable message. The language defaults toDEFAULT_LANG
, but the value can be retrieved with thegetLang()
method.- Returns:
- the human-readable message if defined;
null
otherwise.
-
setMsg
public void setMsg(java.lang.String aMsg)
Sets the optional human-readable message. The language defaults toDEFAULT_LANG
, but can be set with thesetLang(String)
method.- Parameters:
aMsg
- human-readable message
-
getMsgNodeList
public org.w3c.dom.NodeList getMsgNodeList()
Gets the message DOMNodeList
representing mixed XML content for the message. This is an alternative to using a simpleString
for the message.- Returns:
- Message
NodeList
if defined;null
otherwise
-
setMsgNodeList
public void setMsgNodeList(org.w3c.dom.NodeList aMsgNodeList)
Sets the message DOMNodeList
representing mixed XML content for the message. This is an alternative to using a simpleString
for the message.- Parameters:
aMsgNodeList
-NodeList
containing mixed XML content
-
encode
public org.w3c.dom.Element encode(org.w3c.dom.Document aDocument) throws EPPEncodeException
encodeEPPMsgQueue
into a DOM element tree.- Specified by:
encode
in interfaceEPPCodecComponent
- Parameters:
aDocument
- Factory for DOM components- Returns:
- <extValue> root element tree.
- Throws:
EPPEncodeException
- Error encoding the DOM element tree.
-
decode
public void decode(org.w3c.dom.Element aElement) throws EPPDecodeException
decodeEPPMsgQueue
from a DOM element tree. TheaElement
argument needs to be the "extValue" element.- Specified by:
decode
in interfaceEPPCodecComponent
- Parameters:
aElement
- The "extValue" XML element.- Throws:
EPPDecodeException
- Error decoding the DOM element tree.
-
equals
public boolean equals(java.lang.Object aObject)
implements a deepEPPMsgQueue
compare.- Overrides:
equals
in classjava.lang.Object
- Parameters:
aObject
-EPPMsgQueue
instance to compare with- Returns:
true
if equal;false
otherwise
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
CloneEPPMsgQueue
.- Specified by:
clone
in interfaceEPPCodecComponent
- Overrides:
clone
in classjava.lang.Object
- Returns:
- Deep copy clone of
EPPMsgQueue
- Throws:
java.lang.CloneNotSupportedException
- standard Object.clone exception
-
toString
public java.lang.String toString()
Implementation ofObject.toString
, which will result in an indented XMLString
representation of the concreteEPPCodecComponent
.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Indented XML
String
if successful;ERROR
otherwise.
-
getNamespace
public java.lang.String getNamespace()
Returns the XML namespace associated with theEPPCodecComponent
.- Specified by:
getNamespace
in interfaceEPPCodecComponent
- Returns:
- XML namespace for the
EPPCodecComponent
.
-
-