FileDocCategorySizeDatePackage
ResourceAbstractionLayerImpl.javaAPI DocphoneME MR2 API (J2ME)3680Wed 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 the emulator needs. It is assumed that it will be modified or rewritten to be more optimized for a target device.

Fields Summary
private static final int
MAX_CACHE_SIZE
maximum cache size.
private static final int
MAX_RESOURCE_SIZE
maximum 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 ResourceAbstractionLayer. 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.

return
application resource manager

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

return
device resource manager

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