Package com.verisign.epp.codec.gen
Class EPPPollCmd
java.lang.Object
com.verisign.epp.codec.gen.EPPCommand
com.verisign.epp.codec.gen.EPPPollCmd
- All Implemented Interfaces:
EPPCodecComponent,EPPMessage,Serializable,Cloneable
The EPP <pollgt; command is used to discover and retrieve client service
messages from a server. Information that MAY be made available to a client
using service messages includes notification of object transfer requests
and anticipated server outages; other messages types MAY be defined as a
matter of server policy.
Service messages are queued by the server for client retrieval. A <pollgt; command MUST return the first message from the message queue. Each message returned from the server includes a server-unique message identifier that MUST be provided to acknowledge receipt of the message, and a counter that indicates the number of messages in the queue. As a message is received by the client, the client MUST respond to the message with an explicit acknowledgement to confirm that the message has been received. A server MUST dequeue a message and decrement the queue counter after receiving acknowledgement from the client, making the next message in the queue (if any) available for retrieval.
Some of the information returned in response to a <pollgt; command MAY be object-specific, so some child elements of the <pollgt; response MAY be specified using the EPP extension framework. In addition to the standard EPP command elements, the <pollgt; command SHALL contain no child elements and an
Service messages are queued by the server for client retrieval. A <pollgt; command MUST return the first message from the message queue. Each message returned from the server includes a server-unique message identifier that MUST be provided to acknowledge receipt of the message, and a counter that indicates the number of messages in the queue. As a message is received by the client, the client MUST respond to the message with an explicit acknowledgement to confirm that the message has been received. A server MUST dequeue a message and decrement the queue counter after receiving acknowledgement from the client, making the next message in the queue (if any) available for retrieval.
Some of the information returned in response to a <pollgt; command MAY be object-specific, so some child elements of the <pollgt; response MAY be specified using the EPP extension framework. In addition to the standard EPP command elements, the <pollgt; command SHALL contain no child elements and an
op attribute with value req to
retrieve the first message from the server message queue, or both an
op attribute with value ack and a
msgID attribute whose value corresponds to the value of
id attribute copied from the <msggt; element in the response
that is being acknowledged. - See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringmsgID attribute whose value corresponds to the value ofidattribute copied from themsgelement in the response that is being acknowledged.protected StringOperation "op" associated with theEPPPollCmd.static final StringPoll operation type indicating that the client has received a message and that the server can remove the message.static final StringPoll operation type indicating that the client is requesting information from the server.Fields inherited from class com.verisign.epp.codec.gen.EPPCommand
extensions, OP_APPROVE, OP_CANCEL, OP_QUERY, OP_REJECT, OP_REQUEST, transId, TYPE_CHECK, TYPE_CREATE, TYPE_DELETE, TYPE_INFO, TYPE_LOGIN, TYPE_LOGOUT, TYPE_POLL, TYPE_RENEW, TYPE_TRANSFER, TYPE_UPDATE -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.EPPPollCmd(String aTransId, String aOp) EPPPollCmdthat takes all required attributes as arguments for aEPPPollCmd.OP_REQpoll command.EPPPollCmd(String aTransId, String aOp, String aMsgID) EPPPollCmdthat takes attributes as arguments. -
Method Summary
Modifier and TypeMethodDescriptionclone()CloneEPPPollCmd.protected voidMust be defined byEPPPollCmdextensions (Command Mappings) to decode the attributes to a DOM Element tree.protected ElementMust be defined byEPPPollCmdextensions (Command Mappings) to encode the attributes to a DOM Element tree.protected voiddoGenDecode(Element aElement) Decodes theEPPPollCmdattributes from theaElementDOM Element tree.protected ElementdoGenEncode(Document aDocument) Encodes a DOM Element tree from the attributes of theEPPPollCmdinstance.booleanCompares an instance of EPPPollCmd with this instance.getMsgID()Gets the poll Message Id.Gets the associated EPP namespace.getOp()Gets the EPP command operation attribute associated withEPPPollCmd.getType()Gets the EPP command type associated with EPPPollCmd.voidSets the poll Message Id.Methods inherited from class com.verisign.epp.codec.gen.EPPCommand
addExtension, decode, encode, findDuplicateExtNamespaces, findExtNamespaces, findExtNamespaceSuffixes, findUnsupportedExtNamespaces, findUnsupportedExtNamespaceSuffixes, getExtension, getExtension, getExtensions, getKey, getTransId, hasExtension, hasExtensions, hasKey, hasTransId, setExtension, setExtensions, setTransId, toString
-
Field Details
-
OP_REQ
Poll operation type indicating that the client is requesting information from the server.- See Also:
-
OP_ACK
Poll operation type indicating that the client has received a message and that the server can remove the message.- See Also:
-
op
Operation "op" associated with theEPPPollCmd. This should be equal to one of theEPPPollCmd.OP_constants. -
msgID
msgID attribute whose value corresponds to the value ofidattribute copied from themsgelement in the response that is being acknowledged.
-
-
Constructor Details
-
EPPPollCmd
public EPPPollCmd()Default constructor. Will set both op and msgId tonull. -
EPPPollCmd
EPPPollCmdthat takes all required attributes as arguments for aEPPPollCmd.OP_REQpoll command. IfaOpisEPPPollCmd.OP_ACK, the message id must be set withsetMsgIdbefore callingencode.- Parameters:
aTransId- Transaction Id associated with command.aOp- One of theEPPPollCmd.OP_constants.
-
EPPPollCmd
EPPPollCmdthat takes attributes as arguments.- Parameters:
aTransId- Transaction Id associated with command.aOp- One of theEPPPollCmd.OP_constants.aMsgID- Message Id when operation isEPPPollCmd.OP_ACK.
-
-
Method Details
-
getType
Gets the EPP command type associated with EPPPollCmd.- Specified by:
getTypein classEPPCommand- Returns:
EPPCommand.TYPE_POLL
-
getOp
Gets the EPP command operation attribute associated withEPPPollCmd.- Overrides:
getOpin classEPPCommand- Returns:
- One of the
EPPCommand.OP_constants associated with the poll command.
-
equals
Compares an instance of EPPPollCmd with this instance.- Overrides:
equalsin classEPPCommand- Parameters:
aObject- Object to compare with.- Returns:
trueif equal;falseotherwise.
-
doGenEncode
Encodes a DOM Element tree from the attributes of theEPPPollCmdinstance. This method is a member of the Template Design Pattern.EPPCommand.encodeis a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.- Specified by:
doGenEncodein classEPPCommand- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the
EPPPollCmdinstance. - Throws:
EPPEncodeException- Unable to encodeEPPPollCmdinstance.
-
doGenDecode
Decodes theEPPPollCmdattributes from theaElementDOM Element tree. This method is a member of the Template Design Pattern.EPPCommand.decodeis a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.- Specified by:
doGenDecodein classEPPCommand- Parameters:
aElement- - Root DOM Element to decodeEPPPollCmdfrom.- Throws:
EPPDecodeException- Unable to decode aElement
-
clone
CloneEPPPollCmd.- Specified by:
clonein interfaceEPPCodecComponent- Overrides:
clonein classEPPCommand- Returns:
- clone of
EPPPollCmd - Throws:
CloneNotSupportedException- standard Object.clone exception
-
doEncode
Must be defined byEPPPollCmdextensions (Command Mappings) to encode the attributes to a DOM Element tree.doGenEncodeis a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.- Parameters:
aDocument- - DOM Document that is being built. Used as an Element factory.- Returns:
- Root DOM Element representing the EPPPollCmd extension instance.
- Throws:
EPPEncodeException- Unable to encode EPPPollCmd extension instance.
-
doDecode
Must be defined byEPPPollCmdextensions (Command Mappings) to decode the attributes to a DOM Element tree.doGenDecodeis a Template Method and this method is a Primitive Operation within the Template Method Design Pattern.- Parameters:
aElement- Root DOM Element representing theEPPPollCmdextension instance.- Throws:
EPPDecodeException- Unable to decodeaElement.
-
getMsgID
Gets the poll Message Id.- Returns:
- Message Id if defined; null otherwise.
-
getNamespace
Gets the associated EPP namespace. The general EPP namespace is returned, which is defined asEPPCodec.NS.- Specified by:
getNamespacein interfaceEPPCodecComponent- Specified by:
getNamespacein interfaceEPPMessage- Specified by:
getNamespacein classEPPCommand- Returns:
- namespace URI
-
setMsgID
Sets the poll Message Id.- Parameters:
aMsgID- Message Id
-