Class EmbeddedPDLClient


  • public class EmbeddedPDLClient
    extends java.lang.Object
    An example of an embedded PDL client. Creates a notification receiver, which store it's information in a specified directory. Listeners can be added to this receiver before its startup() method is called, which starts the distribution process.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String EMBEDDED_INDEX_FILE
      name for notification index file, in data directory.
      static java.lang.String EMBEDDED_NAME
      name for embedded receiver, appears in log files.
      static java.lang.String EMBEDDED_STORAGE_DIRECTORY
      name for receiver storage directory, in data directory.
      static java.lang.String EMBEDDED_TRACKING_FILE
      name for eids tracking file, in data directory.
    • Constructor Summary

      Constructors 
      Constructor Description
      EmbeddedPDLClient​(java.io.File dataDirectory, java.lang.String serverHost, java.lang.Integer serverPort, java.lang.String alternateServersList)
      Construct an embedded PDL client.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      EIDSNotificationReceiver getReceiver()
      Get the embedded EIDSNotificationReceiver object for further configuration, adding/removing listeners, and starting/stopping distribution.
      static void main​(java.lang.String[] args)
      Example main method that uses the EmbeddedPDLClient.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • EMBEDDED_NAME

        public static final java.lang.String EMBEDDED_NAME
        name for embedded receiver, appears in log files.
        See Also:
        Constant Field Values
      • EMBEDDED_TRACKING_FILE

        public static final java.lang.String EMBEDDED_TRACKING_FILE
        name for eids tracking file, in data directory.
        See Also:
        Constant Field Values
      • EMBEDDED_INDEX_FILE

        public static final java.lang.String EMBEDDED_INDEX_FILE
        name for notification index file, in data directory.
        See Also:
        Constant Field Values
      • EMBEDDED_STORAGE_DIRECTORY

        public static final java.lang.String EMBEDDED_STORAGE_DIRECTORY
        name for receiver storage directory, in data directory.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EmbeddedPDLClient

        public EmbeddedPDLClient​(java.io.File dataDirectory,
                                 java.lang.String serverHost,
                                 java.lang.Integer serverPort,
                                 java.lang.String alternateServersList)
                          throws java.lang.Exception
        Construct an embedded PDL client.
        Parameters:
        dataDirectory - directory where receiver files are stored.
        serverHost - PDL hub hostname.
        serverPort - PDL hub port.
        alternateServersList - comma separated list of "hostname:port" alternate pdl hubs.
        Throws:
        java.lang.Exception - if error occurs
    • Method Detail

      • getReceiver

        public EIDSNotificationReceiver getReceiver()
        Get the embedded EIDSNotificationReceiver object for further configuration, adding/removing listeners, and starting/stopping distribution.
        Returns:
        the embedded EIDSNotificationReceiver object.
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Example main method that uses the EmbeddedPDLClient.
        Parameters:
        args - not used.
        Throws:
        java.lang.Exception - if error occurs