|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ApplicationGroup
An ApplicationGroup object encapsulates the runtime characteristics of a group of application modules or of a standalone application module.
Application groups are composite applications, that is applications assembled from one or more tightly inter-operating component applications of the same type (meaning implementing the same application model) that have been deployed together as one unit.
Standalone application modules are the units of distribution and deployment of individual applications. Standalone application modules are treated as single-component application groups.
Classic applet-based applications can only be packaged as single-component application groups.
Component applications are identified within an application group with their module name (See Runtime Environment Specification for the Java Card Platform, Connected Edition, chapter 8 for details regarding the Runtime descriptor).
The unnamed single modules of standalone application modules are
identified by the default name DEFAULT_MODULE_NAME
, which
corresponds to the empty-string "". This default name also identifies
the first module in an application group.
An application group once loaded can be initialized and bound to a dedicated execution context (group context). All instances of its component applications share that same context and can therefore very effectively intercommunicate. They also share the same security policy (protection domain).
ApplicationGroup objects are permanent Java Card runtime environment Entry Point Objects.
Some operations on application groups are subject to permission checks.
DeploymentUnit
,
Application
,
ProtectionDomain
,
CredentialManager
,
CredentialManager.SecurityRequirements
,
CardManagementPermission
,
JCREPermission
Field Summary | |
---|---|
static String |
DEFAULT_MODULE_NAME
The default module name. |
static byte |
TYPE_CLASSIC_APPLET
Classic applet application type. |
static byte |
TYPE_EXTENDED_APPLET
Extended applet application type. |
static byte |
TYPE_WEB
Web application type. |
Fields inherited from interface com.sun.javacard.spi.cardmgmt.DeploymentUnit |
---|
APP_TYPE, LIB_TYPE |
Method Summary | |
---|---|
Enumeration<String> |
getApplicationModuleNames()
Returns an enumeration of this application group's application module names. |
Enumeration<Application> |
getApplications()
Returns an enumeration of all the registered instances of this application group's component applications. |
CredentialManager |
getCredentialManager()
Returns the credential manager assigned at initialization time to this application group. |
ProtectionDomain |
getProtectionDomain()
Returns the protection domain assigned at initialization time to this application group. |
CredentialManager.SecurityRequirements |
getSecurityRequirements()
Returns the security requirements assigned at initialization time to this application group. |
void |
init(ProtectionDomain protectionDomain,
CredentialManager credentialManager,
CredentialManager.SecurityRequirements securityRequirements)
Initializes this application group with a protection domain, a credential manager and security requirements. |
Application |
newApplication(String moduleName,
String declaredAppURI,
String requestedAppURI,
Hashtable<String,String> runtimeConfig,
Object[] initParams)
Creates a new instance of one of this application group's component applications. |
boolean |
unload(boolean forced)
Attempts to unload this application group. |
Methods inherited from interface com.sun.javacard.spi.cardmgmt.DeploymentUnit |
---|
getType |
Field Detail |
---|
static final byte TYPE_CLASSIC_APPLET
static final byte TYPE_EXTENDED_APPLET
static final byte TYPE_WEB
static final String DEFAULT_MODULE_NAME
Method Detail |
---|
Enumeration<Application> getApplications()
IllegalStateException
- if this application group was loaded but not yet
initialized.Enumeration<String> getApplicationModuleNames()
CredentialManager getCredentialManager()
SecurityException
- if retrieving the credential manager of this application
group is not granted.
IllegalStateException
- if this application group was loaded but not yet
initialized.CredentialManager.SecurityRequirements getSecurityRequirements()
SecurityException
- if retrieving the security requirements of this application
group is not granted.
IllegalStateException
- if this application group was loaded but not yet
initialized.ProtectionDomain getProtectionDomain()
SecurityException
- if retrieving the protection domain of this application
group is not granted.
IllegalStateException
- if this application group was loaded but not yet
initialized.void init(ProtectionDomain protectionDomain, CredentialManager credentialManager, CredentialManager.SecurityRequirements securityRequirements)
This method must call the
ProtectionDomain.setApplicationGroup()
method to assign
the protection domain object to this application group.
protectionDomain
- the protection domain to be assigned to this application
group.credentialManager
- the credential manager to be assigned to this application
group (may be null).securityRequirements
- the security requirements to be assigned to this application
group (may be null).
NullPointerException
- if protectionDomain
is null.
SecurityException
- if the provide protection domain is not bound to a platform
policy protection domain defined for this application type.
IllegalStateException
- if this application group was already initialized or if the
protection domain object has already been assigned to another
context.Application newApplication(String moduleName, String declaredAppURI, String requestedAppURI, Hashtable<String,String> runtimeConfig, Object[] initParams)
moduleName
- the module name of the component application to be
instantiated.declaredAppURI
- the default web application URI of the specified web module as
declared in the runtime descriptor or the AID URI of the
applet class within the specified applet module as declared
the applet application deployment descriptor; or null when the
default is assumed.requestedAppURI
- the web application URI to be used for registration of the
created web application instance instead of the default web
application URI of the specified web module as declared in the
runtime descriptor or the AID URI to be used for registration
of the created applet application instance instead of the AID
URI of the applet class within the specified applet module as
declared the applet application deployment descriptor; or null
when the default is assumed.runtimeConfig
- the runtime parameters (as a set of name/value pairs) that
override the parameters with the same names in the runtime
descriptor information of the component application to be
instantiated; or null when the default parameter values
from the runtime descriptor are assumed.initParams
- the initialization parameters (the values of these parameters
should typically be SIOs or a "implicitly transferable"
objects.
NullPointerException
- if moduleName
is null.
SecurityException
- runtimeConfig
is not null but runtime
parameter overriding is not permitted.IllegalArgumentException
- moduleName
is not recognized.declaredAppURI
is not recognized.requestedAppURI
is not a well-formed
application URI.requestedAppURI
was already assigned
or overlaps or is overlapped by an already assigned
application URI.requestedAppURI
is illegal - that is:
it is in the platform or standard namespace.IllegalStateException
- boolean unload(boolean forced)
If all the application instances of this application group have not yet been deleted, the unload must be denied.
If the unload is forced, all the application instances of this application group and the application group itself will be atomically deleted and unloaded, respectively.
If classes or objects from this application group or any of its application instances are still being referenced by other deployment units or application instances the unload must be denied.
Any failed attempt must roll back any partially completed unloading steps.
unload
in interface DeploymentUnit
forced
- whether not yet deleted application instances must first be
deleted.
SecurityException
- if unloading a deployment unit is not granted.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |