FileDocCategorySizeDatePackage
ResourceAbstractionLayerImpl.javaAPI DocphoneME MR2 API (J2ME)3865Wed May 02 18:00:46 BST 2007com.sun.j2me.global

ResourceAbstractionLayerImpl

public class ResourceAbstractionLayerImpl extends ResourceAbstractionLayer
This class customizes the MIA resources implementation from the com.sun.j2me.global package to access device resources through native function calls. Application resources handling functionality of {@link com.sun.j2me.global.AppResourceManager} is reused.

Fields Summary
private static final int
MAX_CACHE_SIZE
Maximum cache size.
private static final int
MAX_RESOURCE_SIZE
Maximum cached resource size.
private static final ResourceCache
commonResourceCache
Use cached common resources. This implementation alows to set limit for maximum cache size in kB and maximum resource size in kB.
private static final ResourceCache
deviceResourceCache
Use cached device resources. This implementation alows to set limit for maximum cache size in kB and maximum resource size in kB.
private ResourceManagerFactory
devResourceManagerFactory
A resource manager factory for creating device resource managers.
private ResourceManagerFactory
appResourceManagerFactory
A resource manager factory for creating application resource managers.
Constructors Summary
public ResourceAbstractionLayerImpl()
Create instance of ResourceAbstractionLayerImpl. This constructor is necessary because of Class.forName() creation call in {@link com.sun.j2me.global.ResourceAbstractionLayer#getInstance}.



                         
       
Methods Summary
public ResourceManagerFactorygetAppResourceManagerFactory()
Create application resource manager factory.

return
instance of AppResourceManagerFactory with caching enabled

        if (appResourceManagerFactory == null) {
            appResourceManagerFactory = 
            new AppResourceManagerFactory(commonResourceCache);
        }
        return appResourceManagerFactory;
    
public ResourceManagerFactorygetDevResourceManagerFactory()
Create device resource manager factory.

return
instance of DevResourceManagerFactory with caching enabled

        if (devResourceManagerFactory == null) {
            devResourceManagerFactory = 
            new DevResourceManagerFactory(deviceResourceCache);
        }
        return devResourceManagerFactory;