Class ARequestNotifier

  • All Implemented Interfaces:
    INotify, IRequestNotifier

    public class ARequestNotifier
    extends java.lang.Object
    implements IRequestNotifier
    The ARequestNotifier class implements the IRequestNotifier interface, which notifies all registered request listeners.
    Version:
    $Revision$, $Date$
    • Field Detail

      • logger

        public static org.slf4j.Logger logger
    • Constructor Detail

      • ARequestNotifier

        public ARequestNotifier()
    • Method Detail

      • setPublishingQueue

        public void setPublishingQueue​(boolean isPublishingQueueEnabled,
                                       int publishingQueuePriorityLevel,
                                       int maxNumberOfPublishingThreads,
                                       int publishingQueuePageSize,
                                       int savePublishingStatus)
        Description copied from interface: IRequestNotifier
        Sets publishing queue parameters.
        Specified by:
        setPublishingQueue in interface IRequestNotifier
        Parameters:
        isPublishingQueueEnabled - publishing queue switch
        publishingQueuePriorityLevel - publishing queue priority level
        maxNumberOfPublishingThreads - maximum number of publishing threads
        publishingQueuePageSize - publishing queue page size
      • registerListener

        public void registerListener​(java.lang.String name,
                                     IRequestListener listener)
        Registers a request listener.
        Specified by:
        registerListener in interface IRequestNotifier
        Parameters:
        name - listener name
        listener - listener to be registered
      • removeListener

        public void removeListener​(IRequestListener listener)
        Removes listener from the list of registered listeners.
        Specified by:
        removeListener in interface IRequestNotifier
        Parameters:
        listener - listener to be removed from the list
      • getListenerNames

        public java.util.Enumeration<java.lang.String> getListenerNames()
        Gets list of listener names.
        Specified by:
        getListenerNames in interface IRequestNotifier
        Returns:
        enumeration of listener names
      • removeListener

        public void removeListener​(java.lang.String name)
        Removes listener from the list of registered listeners.
        Specified by:
        removeListener in interface IRequestNotifier
        Parameters:
        name - listener name to be removed from the list
      • getListener

        public IRequestListener getListener​(java.lang.String name)
        Gets listener from the list of registered listeners.
        Specified by:
        getListener in interface IRequestNotifier
        Parameters:
        name - listener name
        Returns:
        listener
      • getNumberOfRequests

        public int getNumberOfRequests()
        Gets number of requests in publishing queue.
        Specified by:
        getNumberOfRequests in interface IRequestNotifier
        Returns:
        number of requests in publishing queue
      • isPublishingQueueEnabled

        public boolean isPublishingQueueEnabled()
        Checks if publishing queue is enabled.
        Specified by:
        isPublishingQueueEnabled in interface IRequestNotifier
        Returns:
        true if publishing queue is enabled, false otherwise
      • removeNotifierThread

        public void removeNotifierThread​(java.lang.Thread notifierThread)
        Removes a notifier thread from the pool of publishing queue threads.
        Specified by:
        removeNotifierThread in interface IRequestNotifier
        Parameters:
        notifierThread - Thread
      • notify

        public void notify​(IRequest r)
        Notifies all registered listeners about request.
        Specified by:
        notify in interface INotify
        Parameters:
        r - request
      • addToNotify

        public void addToNotify​(IRequest r)
        Notifies all registered listeners about request.
        Specified by:
        addToNotify in interface IRequestNotifier
        Parameters:
        r - request
      • recoverPublishingQueue

        public void recoverPublishingQueue​(java.lang.String id)
        Recovers publishing queue.
        Parameters:
        id - request request