Class EIDSNotificationReceiver

  • All Implemented Interfaces:
    NotificationIndexCleanup.Listener, NotificationReceiver, EIDSListener, Configurable
    Direct Known Subclasses:
    EIDSProductReceiver

    public class EIDSNotificationReceiver
    extends DefaultNotificationReceiver
    implements EIDSListener
    Receive XML notifications using EIDS. This class implements the Configurable interface, and has the following options:
    serverHost
    The EIDS Server hostname or IP address.
    serverPort
    The EIDS Server listen port, usually 39977.
    alternateServers
    A comma separated list of HOST:PORT pairs. The EIDSClient will attempt to connect to these servers when unable to connect to the primary serverHost:serverPort.
    trackingFile
    A file name used for tracking connection state. This is used to receive missed messages when (re)connecting.
    • Field Detail

      • EIDS_SERVER_HOST_PROPERTY

        public static final java.lang.String EIDS_SERVER_HOST_PROPERTY
        Property name for eids server host address.
        See Also:
        Constant Field Values
      • EIDS_SERVER_PORT

        public static final java.lang.String EIDS_SERVER_PORT
        Property name for eids server port.
        See Also:
        Constant Field Values
      • EIDS_ALTERNATE_SERVERS

        public static final java.lang.String EIDS_ALTERNATE_SERVERS
        Property name for eids server alternate servers list.
        See Also:
        Constant Field Values
      • EIDS_TRACKING_FILE

        public static final java.lang.String EIDS_TRACKING_FILE
        Property name for eids client tracking file.
        See Also:
        Constant Field Values
      • EIDS_DEBUG

        public static final java.lang.String EIDS_DEBUG
        Property name for eids client log level.
        See Also:
        Constant Field Values
      • EIDS_MAX_EVENT_AGE

        public static final java.lang.String EIDS_MAX_EVENT_AGE
        Property name for eids max server event age.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EIDSNotificationReceiver

        public EIDSNotificationReceiver()
    • Method Detail

      • onEIDSMessage

        public void onEIDSMessage​(EIDSMessageEvent event)
        Implement the EIDSListener interface to process messages from EIDS. Checks to make sure message has Correct namespace and root element before parsing.
        Specified by:
        onEIDSMessage in interface EIDSListener
        Parameters:
        event - an event object representing the message that was received.
      • configure

        public void configure​(Config config)
                       throws java.lang.Exception
        Description copied from class: DefaultConfigurable
        Process configuration settings. Called before startup().
        Specified by:
        configure in interface Configurable
        Overrides:
        configure in class DefaultNotificationReceiver
        Parameters:
        config - the Config object with settings.
        Throws:
        java.lang.Exception - if configuration exceptions occur.
      • getClient

        public EIDSClient getClient()
        Returns:
        EIDSClient
      • setClient

        public void setClient​(EIDSClient client)
        Parameters:
        client - set EIDSClient