AppBundleProxypublic class AppBundleProxy extends AppProxy AppProxy interface to a not-yet installed application bundle.
Used by the RegistryImpl to parse and extract content handler
registrations. |
Fields Summary |
---|
private com.sun.midp.installer.Installer | installerThe installer with access to the archive. | private com.sun.midp.installer.InstallState | stateThe InstallState. | private final String | authorityThe authority for this bundle. |
Methods Summary |
---|
AppProxy | forClass(java.lang.String classname)Gets the AppProxy for an application class in the current bundle.
AppProxy curr = null;
synchronized (mutex) {
// Check if class already has a AppProxy
curr = (AppBundleProxy)appmap.get(classname);
if (curr == null) {
// Create a new instance and check if it is a valid app
curr = new AppBundleProxy(installer, state,
msuite, authority);
curr.classname = classname;
curr.appmap = appmap;
// Throws ClassNotFoundException or IllegalArgumentException
curr.verifyApplication(classname);
curr.initAppInfo();
appmap.put(classname, curr);
if (LOG_INFO) {
logInfo("AppProxy created: " + this);
}
}
}
return curr;
| java.lang.String | getAuthority()Gets the Trusted authority that authenticated this application.
For MIDP, this is the CA of the signer.
return authority;
| protected void | verifyApplication(java.lang.String classname)Verify that the classname is a valid application.
Overridden to just check if the appropriate file is
in the jar.
try {
installer.verifyMIDlet(classname);
} catch (InvalidJadException ije) {
if (ije.getReason() == InvalidJadException.INVALID_VALUE) {
throw new IllegalArgumentException();
} else {
throw new ClassNotFoundException(classname);
}
}
|
|