Package javax.media.jai

Examples of javax.media.jai.RegistryElementDescriptor


           
            // unload everything that JAI can still refer to
            final OperationRegistry opRegistry = JAI.getDefaultInstance().getOperationRegistry();
            for(String mode : RegistryMode.getModeNames()) {
                for (Iterator descriptors = opRegistry.getDescriptors(mode).iterator(); descriptors != null && descriptors.hasNext();) {
                    RegistryElementDescriptor red = (RegistryElementDescriptor) descriptors.next();
                    int factoryCount = 0;
                    int unregisteredCount = 0;
                    // look for all the factories for that operation
                    for (Iterator factories = opRegistry.getFactoryIterator(mode, red.getName()); factories != null && factories.hasNext();) {
                        Object factory = factories.next();
                        if(factory == null) {
                            continue;
                        }
                        factoryCount++;
                        if(webappClassLoader.equals(factory.getClass().getClassLoader())) {
                            boolean unregistered = false;
                            // we need to scan against all "products" to unregister the factory
                            Vector orderedProductList = opRegistry.getOrderedProductList(mode, red.getName());
                            if(orderedProductList != null) {
                                for(Iterator products = orderedProductList.iterator(); products != null && products.hasNext();) {
                                    String product = (String) products.next();
                                    try {
                                        opRegistry.unregisterFactory(mode, red.getName(), product, factory);
                                        LOGGER.info("Unregistering JAI factory " + factory.getClass());
                                    } catch(Throwable t) {
                                        // may fail due to the factory not being registered against that product
                                    }
                                }
View Full Code Here


           
            // unload everything that JAI can still refer to
            final OperationRegistry opRegistry = JAI.getDefaultInstance().getOperationRegistry();
            for(String mode : RegistryMode.getModeNames()) {
                for (Iterator descriptors = opRegistry.getDescriptors(mode).iterator(); descriptors != null && descriptors.hasNext();) {
                    RegistryElementDescriptor red = (RegistryElementDescriptor) descriptors.next();
                    int factoryCount = 0;
                    int unregisteredCount = 0;
                    // look for all the factories for that operation
                    for (Iterator factories = opRegistry.getFactoryIterator(mode, red.getName()); factories != null && factories.hasNext();) {
                        Object factory = factories.next();
                        if(factory == null) {
                            continue;
                        }
                        factoryCount++;
                        if(webappClassLoader.equals(factory.getClass().getClassLoader())) {
                            boolean unregistered = false;
                            // we need to scan against all "products" to unregister the factory
                            Vector orderedProductList = opRegistry.getOrderedProductList(mode, red.getName());
                            if(orderedProductList != null) {
                                for(Iterator products = orderedProductList.iterator(); products != null && products.hasNext();) {
                                    String product = (String) products.next();
                                    try {
                                        opRegistry.unregisterFactory(mode, red.getName(), product, factory);
                                        LOGGER.info("Unregistering JAI factory " + factory.getClass());
                                    } catch(Throwable t) {
                                        // may fail due to the factory not being registered against that product
                                    }
                                }
View Full Code Here

TOP

Related Classes of javax.media.jai.RegistryElementDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.