Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-565

Refactor ObservationManagerFactory

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.1
    • observation
    • None

    Description

      The current o.a.j.core.observation.ObservationManagerFactory class has two main responsibilities:

      1) Create new ObservationManagerImpl instances as an observation manager factory
      2) Manage event consumers and dispatch events within a workspace

      These two responsibilities are quite unrelated and the factory responsibility essentially boils down to the following method that is only ever invoked within WorkspaceImpl.getObservationManager():

      public ObservationManagerImpl createObservationManager(SessionImpl session, ItemManager itemMgr)

      { return new ObservationManagerImpl(this, session, itemMgr); }

      To simplify the design I'd inline this method and rename ObservationManagerFactory to ObservationDispatcher to better reflect the one remaining responsibility.

      Attachments

        1. dispatcher.patch
          29 kB
          Jukka Zitting

        Activity

          People

            jukkaz Jukka Zitting
            jukkaz Jukka Zitting
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: