Package org.geoserver.config

Examples of org.geoserver.config.JAIInfo


       
        values.put(KEY_JAI_AVAILABLE, Boolean.toString(isNativeJAIAvailable()));
        values.put(KEY_JAI_IMAGEIO_AVAILABLE, Boolean.toString(PackageUtil.isCodecLibAvailable()));

        GeoServerInfo geoServerInfo = getGeoServer().getGlobal();
        JAIInfo jaiInfo = geoServerInfo.getJAI();
        JAI jai =  jaiInfo.getJAI();
        SunTileCache jaiCache = jaiInfo.getTileCache();

        values.put(KEY_JAI_MAX_MEM, formatMemory(jaiCache.getMemoryCapacity()));
        values.put(KEY_JAI_MEM_USAGE, formatMemory(jaiCache.getCacheMemoryUsed()));
        values.put(KEY_JAI_MEM_THRESHOLD, Float.toString(100.0f * jaiCache.getMemoryThreshold()));
        values.put(KEY_JAI_TILE_THREADS, Integer.toString(jai.getTileScheduler().getParallelism()));
View Full Code Here


            HibDefaultsFactoryImpl.createDefaultXXXXspace(geoserver);

            initializeStyles(catalog);

        } else {
            JAIInfo jai = global.getJAI();
            // we are missing the JAI info. This can be due by the fact that previous
            // run was made by a unit test
            if (jai == null) {
                LOGGER.warning("Global is missing JAI info. Setting default ones...");
                global.setJAI(geoserver.getFactory().createJAI());
View Full Code Here

        geoserver.setVerbose(false);
        geoserver.setVerboseExceptions(false);

        // jai
        JAIInfo jai = serviceCatalog.getFactory().createJAI();
        jai.setMemoryCapacity((Double) 0.5);
        jai.setMemoryThreshold((Double) 0.75);
        jai.setTileThreads((Integer) 5);
        jai.setTilePriority((Integer) 5);
        jai.setImageIOCache((Boolean) false);
        jai.setJpegAcceleration((Boolean) false);
        jai.setPngAcceleration((Boolean) false);
        jai.setRecycling((Boolean) false);
        jai.setAllowNativeMosaic(false);

        geoserver.setJAI(jai);

        serviceCatalog.setGlobal(geoserver);
View Full Code Here

import org.geoserver.config.JAIInfo;
import org.geoserver.web.GeoServerWicketTestSupport;

public class JAIPageTest extends GeoServerWicketTestSupport {
    public void testValues() {
        JAIInfo info = (JAIInfo) getGeoServerApplication()
            .getGeoServer()
            .getGlobal().getJAI();

        login();

        tester.startPage(JAIPage.class);
        tester.assertComponent("form:tileThreads", TextField.class);
        tester.assertModelValue("form:tileThreads", info.getTileThreads());
    }
View Full Code Here

        contactInfo.setAddressState( (String) contact.get( "StateOrProvince") );
        contactInfo.setAddressPostalCode( (String) contact.get( "PostCode") );
        info.setContact( contactInfo );
       
        //jai
        JAIInfo jai = new JAIInfoImpl();
        jai.setMemoryCapacity( (Double) value( global.get( "JaiMemoryCapacity"),JAIInfoImpl.DEFAULT_MemoryCapacity ) );
        jai.setMemoryThreshold( (Double) value( global.get( "JaiMemoryThreshold"), JAIInfoImpl.DEFAULT_MemoryThreshold) );
        jai.setTileThreads( (Integer) value( global.get( "JaiTileThreads"), JAIInfoImpl.DEFAULT_TileThreads ) );
        jai.setTilePriority( (Integer) value( global.get( "JaiTilePriority"), JAIInfoImpl.DEFAULT_TilePriority ) );
        jai.setImageIOCache( (Boolean) value( global.get( "ImageIOCache" ), JAIInfoImpl.DEFAULT_ImageIOCache) );
        jai.setJpegAcceleration( (Boolean) value( global.get( "JaiJPEGNative" ),JAIInfoImpl.DEFAULT_JPEGNative ) );
        jai.setPngAcceleration( (Boolean) value( global.get( "JaiPNGNative" ), JAIInfoImpl.DEFAULT_PNGNative)  );
        jai.setRecycling( (Boolean) value( global.get( "JaiRecycling" ), JAIInfoImpl.DEFAULT_Recycling)  );
        jai.setAllowNativeMosaic((Boolean) value( global.get( "JaiMosaicNative" ), JAIInfoImpl.DEFAULT_MosaicNative) );
        info.setJAI( jai );
        
        geoServer.setGlobal( info );
       
        //logging
View Full Code Here

    public WMSInterpolation getInterpolation() {
        return getServiceInfo().getInterpolation();
    }

    public Boolean getPNGNativeAcceleration() {
        JAIInfo jaiInfo = getJaiInfo();
        return Boolean.valueOf(jaiInfo.isPngAcceleration());
    }
View Full Code Here

        JAIInfo jaiInfo = getJaiInfo();
        return Boolean.valueOf(jaiInfo.isPngAcceleration());
    }

    public Boolean getJPEGNativeAcceleration() {
        JAIInfo jaiInfo = getJaiInfo();
        return Boolean.valueOf(jaiInfo.isJpegAcceleration());
    }
View Full Code Here

        contactInfo.setAddressState( (String) contact.get( "StateOrProvince") );
        contactInfo.setAddressPostalCode( (String) contact.get( "PostCode") );
        info.setContact( contactInfo );
       
        //jai
        JAIInfo jai = new JAIInfoImpl();
        jai.setMemoryCapacity( (Double) value( global.get( "JaiMemoryCapacity"),JAIInfoImpl.DEFAULT_MemoryCapacity ) );
        jai.setMemoryThreshold( (Double) value( global.get( "JaiMemoryThreshold"), JAIInfoImpl.DEFAULT_MemoryThreshold) );
        jai.setTileThreads( (Integer) value( global.get( "JaiTileThreads"), JAIInfoImpl.DEFAULT_TileThreads ) );
        jai.setTilePriority( (Integer) value( global.get( "JaiTilePriority"), JAIInfoImpl.DEFAULT_TilePriority ) );
        jai.setJpegAcceleration( (Boolean) value( global.get( "JaiJPEGNative" ),JAIInfoImpl.DEFAULT_JPEGNative ) );
        jai.setPngAcceleration( (Boolean) value( global.get( "JaiPNGNative" ), JAIInfoImpl.DEFAULT_PNGNative)  );
        jai.setRecycling( (Boolean) value( global.get( "JaiRecycling" ), JAIInfoImpl.DEFAULT_Recycling)  );
        jai.setAllowNativeMosaic((Boolean) value( global.get( "JaiMosaicNative" ), JAIInfoImpl.DEFAULT_MosaicNative) );
        info.setJAI( jai );
        
        geoServer.setGlobal( info );
       
        //logging
View Full Code Here

       
        values.put(KEY_JAI_AVAILABLE, Boolean.toString(isNativeJAIAvailable()));
        values.put(KEY_JAI_IMAGEIO_AVAILABLE, Boolean.toString(PackageUtil.isCodecLibAvailable()));

        GeoServerInfo geoServerInfo = getGeoServer().getGlobal();
        JAIInfo jaiInfo = geoServerInfo.getJAI();
        JAI jai =  jaiInfo.getJAI();
        CoverageAccessInfo coverageAccess = geoServerInfo.getCoverageAccess();
        SunTileCache jaiCache = jaiInfo.getTileCache();

        values.put(KEY_JAI_MAX_MEM, formatMemory(jaiCache.getMemoryCapacity()));
        values.put(KEY_JAI_MEM_USAGE, formatMemory(jaiCache.getCacheMemoryUsed()));
        values.put(KEY_JAI_MEM_THRESHOLD, Float.toString(100.0f * jaiCache.getMemoryThreshold()));
        values.put(KEY_JAI_TILE_THREADS, Integer.toString(jai.getTileScheduler().getParallelism()));
View Full Code Here

        contactInfo.setAddressState( (String) contact.get( "StateOrProvince") );
        contactInfo.setAddressPostalCode( (String) contact.get( "PostCode") );
        info.setContact( contactInfo );
       
        //jai
        JAIInfo jai = new JAIInfoImpl();
        jai.setMemoryCapacity( (Double) value( global.get( "JaiMemoryCapacity"),JAIInfoImpl.DEFAULT_MemoryCapacity ) );
        jai.setMemoryThreshold( (Double) value( global.get( "JaiMemoryThreshold"), JAIInfoImpl.DEFAULT_MemoryThreshold) );
        jai.setTileThreads( (Integer) value( global.get( "JaiTileThreads"), JAIInfoImpl.DEFAULT_TileThreads ) );
        jai.setTilePriority( (Integer) value( global.get( "JaiTilePriority"), JAIInfoImpl.DEFAULT_TilePriority ) );
        jai.setJpegAcceleration( (Boolean) value( global.get( "JaiJPEGNative" ),JAIInfoImpl.DEFAULT_JPEGNative ) );
        jai.setPngAcceleration( (Boolean) value( global.get( "JaiPNGNative" ), JAIInfoImpl.DEFAULT_PNGNative)  );
        jai.setRecycling( (Boolean) value( global.get( "JaiRecycling" ), JAIInfoImpl.DEFAULT_Recycling)  );
        jai.setAllowNativeMosaic((Boolean) value( global.get( "JaiMosaicNative" ), JAIInfoImpl.DEFAULT_MosaicNative) );
        info.setJAI( jai );
        
        geoServer.setGlobal( info );
       
        //logging
View Full Code Here

TOP

Related Classes of org.geoserver.config.JAIInfo

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.