Class EventIpcManagerDefaultImpl

    • Constructor Detail

      • EventIpcManagerDefaultImpl

        public EventIpcManagerDefaultImpl​(com.codahale.metrics.MetricRegistry registry)

        Constructor for EventIpcManagerDefaultImpl.

    • Method Detail

      • sendNow

        public void sendNow​(Event event)
        Asynchronously sends an event to eventd. Called by a service to send an event to other listeners.
        Specified by:
        sendNow in interface EventForwarder
        Parameters:
        event - a Event object.
      • sendNow

        public void sendNow​(Log eventLog)
        Called by a service to send a set of events to other listeners. Creates a new event handler for the event log and queues it to the event handler thread pool.
        Specified by:
        sendNow in interface EventForwarder
        Parameters:
        eventLog - a Log object.
      • sendNowSync

        public void sendNowSync​(Log eventLog)
        Description copied from interface: EventForwarder
        Synchronously sends a set of events to eventd.
        Specified by:
        sendNowSync in interface EventForwarder
        Parameters:
        eventLog - a Log object.
      • broadcastNow

        public void broadcastNow​(Event event,
                                 boolean synchronous)
        Description copied from interface: EventIpcBroadcaster
        Called by eventd to send an event to all interested listeners.
        Specified by:
        broadcastNow in interface EventIpcBroadcaster
        Parameters:
        event - a Event object.
        synchronous - Whether this call should wait for all EventListener calls to finish before returning.
      • addEventListener

        public void addEventListener​(EventListener listener)
        Registers an event listener that is interested in all events Register an event listener that is interested in all events. Removes this listener from any UEI-specific matches.
        Specified by:
        addEventListener in interface EventSubscriptionService
        Parameters:
        listener - a EventListener object.
      • addEventListener

        public void addEventListener​(EventListener listener,
                                     java.util.Collection<java.lang.String> ueis)
        Registers an event listener interested in the UEIs in the passed list Register an event listener interested in the UEIs in the passed list.
        Specified by:
        addEventListener in interface EventSubscriptionService
        Parameters:
        listener - a EventListener object.
        ueis - a Collection object.
      • removeEventListener

        public void removeEventListener​(EventListener listener,
                                        java.util.Collection<java.lang.String> ueis)
        Removes a registered event listener - the UEI list indicates the list of events the listener is no more interested in Removes a registered event listener. The UEI list indicates the list of events the listener is no more interested in. Note: The listener thread for this listener is not stopped until the 'removeEventListener(EventListener listener)' method is called.
        Specified by:
        removeEventListener in interface EventSubscriptionService
        Parameters:
        listener - a EventListener object.
        ueis - a Collection object.
      • removeEventListener

        public void removeEventListener​(EventListener listener,
                                        java.lang.String uei)
        Removes a registered event listener. The UEI indicates one the listener is no more interested in. Note: The listener thread for this listener is not stopped until the 'removeEventListener(EventListener listener)' method is called.
        Specified by:
        removeEventListener in interface EventSubscriptionService
        Parameters:
        listener - a EventListener object.
        uei - a String object.
      • removeEventListener

        public void removeEventListener​(EventListener listener)
        Removes a registered event listener Removes a registered event listener. Note: Only this method stops the listener thread for the listener passed.
        Specified by:
        removeEventListener in interface EventSubscriptionService
        Parameters:
        listener - a EventListener object.
      • afterPropertiesSet

        public void afterPropertiesSet()

        afterPropertiesSet

        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • setEventHandler

        public void setEventHandler​(EventHandler eventHandler)

        setEventHandler

        Parameters:
        eventHandler - a EventHandler object.
      • getHandlerPoolSize

        public int getHandlerPoolSize()

        getHandlerPoolSize

        Returns:
        a int.
      • setHandlerPoolSize

        public void setHandlerPoolSize​(int handlerPoolSize)

        setHandlerPoolSize

        Parameters:
        handlerPoolSize - a int.
      • getHandlerQueueLength

        public int getHandlerQueueLength()

        getHandlerQueueLength

        Returns:
        a int.
      • setHandlerQueueLength

        public void setHandlerQueueLength​(int size)

        setHandlerQueueLength

        Parameters:
        size - a int.
      • hasEventListener

        public boolean hasEventListener​(java.lang.String uei)
        Description copied from interface: EventSubscriptionService
        Checks if there is at least one listener for the given uei.
        Specified by:
        hasEventListener in interface EventSubscriptionService
        Parameters:
        uei - the uie to check for
        Returns:
        true iff there is at least one listener