Class ARequestNotifier

  • All Implemented Interfaces:
    com.netscape.certsrv.request.INotify, com.netscape.certsrv.request.IRequestNotifier

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

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger logger  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addToNotify​(com.netscape.certsrv.request.IRequest r)
      Notifies all registered listeners about request.
      com.netscape.certsrv.request.IRequestListener getListener​(java.lang.String name)
      Gets listener from the list of registered listeners.
      java.util.Enumeration<java.lang.String> getListenerNames()
      Gets list of listener names.
      java.util.Enumeration<com.netscape.certsrv.request.IRequestListener> getListeners()
      Gets list of listeners.
      int getNumberOfRequests()
      Gets number of requests in publishing queue.
      com.netscape.certsrv.request.IRequest getRequest()
      Gets request from publishing queue.
      boolean isPublishingQueueEnabled()
      Checks if publishing queue is enabled.
      void notify​(com.netscape.certsrv.request.IRequest r)
      Notifies all registered listeners about request.
      void recoverPublishingQueue​(java.lang.String id)
      Recovers publishing queue.
      void registerListener​(com.netscape.certsrv.request.IRequestListener listener)
      Registers a request listener.
      void registerListener​(java.lang.String name, com.netscape.certsrv.request.IRequestListener listener)
      Registers a request listener.
      void removeListener​(com.netscape.certsrv.request.IRequestListener listener)
      Removes listener from the list of registered listeners.
      void removeListener​(java.lang.String name)
      Removes listener from the list of registered listeners.
      void removeNotifierThread​(java.lang.Thread notifierThread)
      Removes a notifier thread from the pool of publishing queue threads.
      void setPublishingQueue​(boolean isPublishingQueueEnabled, int publishingQueuePriorityLevel, int maxNumberOfPublishingThreads, int publishingQueuePageSize, int savePublishingStatus)
      Sets publishing queue parameters.
      void updatePublishingStatus​(java.lang.String id)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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: com.netscape.certsrv.request.IRequestNotifier
        Sets publishing queue parameters.
        Specified by:
        setPublishingQueue in interface com.netscape.certsrv.request.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​(com.netscape.certsrv.request.IRequestListener listener)
        Registers a request listener.
        Specified by:
        registerListener in interface com.netscape.certsrv.request.IRequestNotifier
        Parameters:
        listener - listener to be registered
      • registerListener

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

        public void removeListener​(com.netscape.certsrv.request.IRequestListener listener)
        Removes listener from the list of registered listeners.
        Specified by:
        removeListener in interface com.netscape.certsrv.request.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 com.netscape.certsrv.request.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 com.netscape.certsrv.request.IRequestNotifier
        Parameters:
        name - listener name to be removed from the list
      • getListener

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

        public java.util.Enumeration<com.netscape.certsrv.request.IRequestListener> getListeners()
        Gets list of listeners.
        Specified by:
        getListeners in interface com.netscape.certsrv.request.IRequestNotifier
        Returns:
        enumeration of listeners
      • updatePublishingStatus

        public void updatePublishingStatus​(java.lang.String id)
        Specified by:
        updatePublishingStatus in interface com.netscape.certsrv.request.IRequestNotifier
      • getRequest

        public com.netscape.certsrv.request.IRequest getRequest()
        Gets request from publishing queue.
        Specified by:
        getRequest in interface com.netscape.certsrv.request.IRequestNotifier
        Returns:
        request
      • getNumberOfRequests

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

        public boolean isPublishingQueueEnabled()
        Checks if publishing queue is enabled.
        Specified by:
        isPublishingQueueEnabled in interface com.netscape.certsrv.request.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 com.netscape.certsrv.request.IRequestNotifier
        Parameters:
        notifierThread - Thread
      • notify

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

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

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