Class FrameworkListener

    • Field Detail

      • contextListeners

        protected final java.util.concurrent.ConcurrentHashMap<Context,​LifecycleListener> contextListeners
        Map of context to their associated lifecycle listeners.
    • Constructor Detail

      • FrameworkListener

        public FrameworkListener()
        Creates a new FrameworkListener instance.
    • Method Detail

      • createLifecycleListener

        protected abstract LifecycleListener createLifecycleListener​(Context context)
        Create a lifecycle listener which will then be added to the specified context.
        Parameters:
        context - the associated Context
        Returns:
        the lifecycle listener
      • registerListenersForServer

        protected void registerListenersForServer​(Server server)
        Registers listeners on all engines of the given server.
        Parameters:
        server - The server to register listeners for
      • registerListenersForEngine

        protected void registerListenersForEngine​(Engine engine)
        Registers listeners on all hosts of the given engine.
        Parameters:
        engine - The engine to register listeners for
      • registerListenersForHost

        protected void registerListenersForHost​(Host host)
        Registers listeners on all contexts of the given host.
        Parameters:
        host - The host to register listeners for
      • registerContextListener

        protected void registerContextListener​(Context context)
        Creates and registers a lifecycle listener for the given context.
        Parameters:
        context - The context to register a listener for
      • processContainerAddChild

        protected void processContainerAddChild​(Container child)
        Processes the addition of a child container by registering appropriate listeners.
        Parameters:
        child - The child container that was added
      • processContainerRemoveChild

        protected void processContainerRemoveChild​(Container child)
        Processes the removal of a child container by unregistering appropriate listeners.
        Parameters:
        child - The child container that was removed