Class IIOProviderContextListener

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletContextListener

    public final class IIOProviderContextListener
    extends java.lang.Object
    implements javax.servlet.ServletContextListener
    Takes care of registering and de-registering local ImageIO plugins (service providers) for the servlet context.

    Registers all available plugins on contextInitialized event, using ImageIO.scanForPlugins(), to make sure they are available to the current servlet context. De-registers all plugins which have the current thread's context class loader as its class loader on contextDestroyed event, to avoid class/resource leak.

    Version:
    $Id: IIOProviderContextListener.java,v 1.0 14.02.12 21:53 haraldk Exp$
    Author:
    Harald Kuhr, last modified by $Author: haraldk$
    See Also:
    ImageIO.scanForPlugins()
    • Constructor Detail

      • IIOProviderContextListener

        public IIOProviderContextListener()
    • Method Detail

      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextDestroyed in interface javax.servlet.ServletContextListener