Class RequestNotifier

java.lang.Object
com.netscape.cmscore.request.RequestNotifier
All Implemented Interfaces:
INotify, IRequestNotifier

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

    • logger

      public static org.slf4j.Logger logger
  • Constructor Details

    • RequestNotifier

      public RequestNotifier()
  • Method Details

    • 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(IRequestListener listener)
      Registers a request listener.
      Specified by:
      registerListener in interface IRequestNotifier
      Parameters:
      listener - listener to be registered
    • registerListener

      public void registerListener(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 Enumeration<String> getListenerNames()
      Gets list of listener names.
      Specified by:
      getListenerNames in interface IRequestNotifier
      Returns:
      enumeration of listener names
    • removeListener

      public void removeListener(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(String name)
      Gets listener from the list of registered listeners.
      Specified by:
      getListener in interface IRequestNotifier
      Parameters:
      name - listener name
      Returns:
      listener
    • getListeners

      public Enumeration<IRequestListener> getListeners()
      Gets list of listeners.
      Specified by:
      getListeners in interface IRequestNotifier
      Returns:
      enumeration of listeners
    • updatePublishingStatus

      public void updatePublishingStatus(String id)
      Specified by:
      updatePublishingStatus in interface IRequestNotifier
    • getRequest

      public Request getRequest()
      Gets request from publishing queue.
      Specified by:
      getRequest in interface IRequestNotifier
      Returns:
      request
    • 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(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(Request r)
      Notifies all registered listeners about request.
      Specified by:
      notify in interface INotify
      Parameters:
      r - request
    • checkAvailablePublishingConnections

      public boolean checkAvailablePublishingConnections()
      Checks for available publishing connections
      Returns:
      true if there are available publishing connections, false otherwise
    • addToNotify

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

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