Package com.verisign.epp.framework

## Class EPPPollQueueMgr

- java.lang.Object
- - com.verisign.epp.framework.EPPPollQueueMgr

-     public class EPPPollQueueMgr
      extends java.lang.Object

  The `EPPPollQueueMgr` is used to handle the poll command, which allows to discover and retrieve client service messages from a server. Once `GenHandler` issues the get method, `EPPPollQueueMgr` receives data from `EPPPollDataSource` and then returns concrete `EPPResponse` back to `GenHandler`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `EPPResponse` | `delete​(java.lang.Object aRecp, java.lang.String aMsgId, java.lang.Object aContextData)` | Delete object from data source
    `EPPResponse` | `get​(java.lang.Object aRecp, java.lang.Object aContextData)` | Gets the `EPPResponse` poll message from the data source
    `EPPPollDataSource` | `getDataSource()` | Gets the poll queue data source
    `static EPPPollQueueMgr` | `getInstance()` | Gets instance of `EPPPollQueueMgr`
    `void` | `put​(java.lang.Object aRecp, java.lang.String aKind, java.lang.Object aData, java.lang.Object aContextData)` | Puts poll message into the poll data source
    `void` | `register​(EPPPollHandler aHandler)` | Registers a poll handler.
    `void` | `setDataSource​(EPPPollDataSource aSource)` | Registers the poll data source.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getInstance

          public static EPPPollQueueMgr getInstance()

      Gets instance of `EPPPollQueueMgr`
      Returns:
        Gets the Singleton instance of `EPPPollQueueMgr`

    - #### getDataSource

          public EPPPollDataSource getDataSource()

      Gets the poll queue data source
      Returns:
        Gets the registered `EPPPollDataSource` if defined;`null` otherwise.

    - #### register

          public void register​(EPPPollHandler aHandler)

      Registers a poll handler.
      Parameters:
        `aHandler` - Poll handler to register in the `EPPPollQueueMgr`.

    - #### setDataSource

          public void setDataSource​(EPPPollDataSource aSource)

      Registers the poll data source.
      Parameters:
        `aSource` - Poll data source to register in the `EPPPollQueueMgr`.

    - #### get

          public EPPResponse get​(java.lang.Object aRecp,
                                 java.lang.Object aContextData)
                          throws EPPPollQueueException

      Gets the `EPPResponse` poll message from the data source
      Parameters:
        `aRecp` - Server-specific recipient object that can be used to filter the messages by the recipient.
        `aContextData` - Server context passed into the `EPPPollDataSource`.
      Returns:
        EPPResponse Returns the concrete `EPPResponse`
      Throws:
        `EPPPollQueueException` - Unable to get the `EPPResponse` from data source

    - #### put

          public void put​(java.lang.Object aRecp,
                          java.lang.String aKind,
                          java.lang.Object aData,
                          java.lang.Object aContextData)
                   throws EPPPollQueueException

      Puts poll message into the poll data source
      Parameters:
        `aRecp` - Recipient of the poll message, which represents the logical poll queue.
        `aKind` - Kind of poll message
        `aData` - Poll message
        `aContextData` - Server context data
      Throws:
        `EPPPollQueueException` - Error putting message in queue

    - #### delete

          public EPPResponse delete​(java.lang.Object aRecp,
                                    java.lang.String aMsgId,
                                    java.lang.Object aContextData)
                             throws EPPPollQueueException

      Delete object from data source
      Parameters:
        `aRecp` - Recipient of the poll message, which represents the logical poll queue.
        `aMsgId` - Message identifier to delete
        `aContextData` - Server context data
      Returns:
        EPPResponse `EPPResponse` containing result of deleting the poll message
      Throws:
        `EPPPollQueueException` - Error deleting the message