com.verisign.epp.serverstub

## Class PollDataSource

- java.lang.Object
- - com.verisign.epp.serverstub.PollDataSource

- All Implemented Interfaces:
    EPPPollDataSource

      public class PollDataSource
      extends java.lang.Object
      implements EPPPollDataSource

  The <PollDataSource> is registered and used by EPPPollQueueMgr to demostrate how data are stored into a queue. The data source can be files, databases or others.
  Version:
    $Revision: 1.3 $
  Author:
    $Author: jim $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PollDataSource()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `delete(java.lang.Object aRecp, java.lang.String aMsgId, java.lang.Object aContextData)` Delete data from data source and return number of messages
    `EPPPollDataRecord` | `get(java.lang.Object aRecp, java.lang.Object aContextData)` Gets data from queue
    `void` | `put(java.lang.Object aRecp, java.lang.String aKind, java.lang.Object aData, java.lang.Object aContextData)` Puts data into queue

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

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

- - ### Constructor Detail

    - #### PollDataSource

          public PollDataSource()

  - ### Method Detail

    - #### get

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

      Gets data from queue
      Specified by:
        `get` in interface `EPPPollDataSource`
      Parameters:
        `aRecp` - Receipt message queue. Not used by the Server Stub.
        `aContextData` - Server specific data that is passed through to the data source (i.e. database connection). Not used by the Server Stub.
      Returns:
        EPPPollDataRecord if exists; `null` otherwise.
      Throws:
        `EPPPollQueueException` - Error getting message from queue

    - #### put

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

      Puts data into queue
      Specified by:
        `put` in interface `EPPPollDataSource`
      Parameters:
        `aRecp` - Message recipient. Not used in Server Stub.
        `aKind` - The type of response data
        `aData` - Message data to put in queue
        `aContextData` - Server specific data that is passed through to the data source (i.e. database connection). Not used by the Server Stub.

    - #### delete

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

      Delete data from data source and return number of messages
      Specified by:
        `delete` in interface `EPPPollDataSource`
      Parameters:
        `aRecp` - Recipient queue. Not used in Server Stub.
        `aMsgId` - Message to delete. Not used in Server Stub, since the Server Stub will delete the top message of queue
        `aContextData` - Server specific data that is passed through to the data source (i.e. database connection). Not used by the Server Stub.
      Returns:
        int Number of messages left in queue
      Throws:
        `EPPPollQueueException` - Error deleting message

Copyright © VeriSign Inc. All Rights Reserved.