Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.javacard.spi.cardmgmt
Class Application

    java.lang.Object
      com.sun.javacard.spi.cardmgmt.Application

    @TransactionType(value=NOT_SUPPORTED)
    public class Application

extends Object

Application object encapsulate the runtime characteristics of an application instance.

An application instance is assigned and registered at creation time with a unique application URI.

Applications instances are bound to the group context of their application group.

Application objects are permanent Java Card runtime environment Entry Point Objects.

Some operations on application instances are subject to permission checks.

Since:
  Java Card 3.0
See Also:
  `ApplicationGroup`, `Event`, `CardManagementPermission`, `JCREPermission`

Field Summary
`protected String` | `appURI` This application instance URI.

Constructor Summary
`protected` | `Application(ApplicationGroup applicationGroup, String moduleName, String appURI)` Creates and registers a new application instance with the provided application URI.

Method Summary
`boolean` | `delete()` Attempts to unregister and delete this application instance.
`static boolean` | `delete(Application[] applications)` Attempts to unregister and delete atomically a set of inter-dependent application instances.
`ApplicationGroup` | `getApplicationGroup()` Returns this applications instance's application group.
`String` | `getAppURI()` Returns this applications instance's application URI.
`String` | `getModuleName()` Returns this application instance's module name.
`byte` | `getType()` Returns this applications instance's application type.
`static Application` | `lookup(String appURI)` Looks up an application instance using its assigned URI.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### appURI

    protected String appURI

  This application instance URI.

Constructor Detail

### Application

    protected Application(ApplicationGroup applicationGroup,
                          String moduleName,
                          String appURI)

  Creates and registers a new application instance with the provided application URI.

  After creating and registering an application instance, all applications which registered for such event (`event:///standard/app/created`) are notified.

  Parameters:
    `applicationGroup` - the application group
    `moduleName` - the module name
    `appURI` - the application URI this application instance will be registered with.
  Throws:
    `IllegalArgumentException` -
    - if `appURI` is not a well-formed application URI.
    - if `appURI` was already assigned or overlaps or is overlapped by an already assigned application URI.
    - if `appURI` is illegal - that is: it is in the platform or standard namespace.
    `NullPointerException` -
    - if `applicationGroup` is null.
    - if `moduleName` is null.
    - if `appURI` is null.
  See Also:
    `Event`

Method Detail

### lookup

    public static Application lookup(String appURI)

  Looks up an application instance using its assigned URI.

  Parameters:
    `appURI` - the application URI to be looked up
  Returns:
    the application instance registered with this URI.

### delete

    public static boolean delete(Application[] applications)

  Attempts to unregister and delete atomically a set of inter-dependent application instances. If other deployment units or application instances not in this set are still holding references to objects owned and bound to the namespace of an application instance in this set the deletion will be denied.

  Before attempting to delete each application instance in the set, any other application which registered for such event (`event:///standard/app/deleting`) is notified.

  After successfully deleting all application instances in the set, any application which registered for such event (`event:///standard/app/deleted`) is notified.

  Any failed attempt must roll back any partially completed deletion steps.

  Parameters:
    `applications` - the set of application instances to be deleted.
  Returns:
    true if the deletion succeeded, false otherwise.
  Throws:
    `NullPointerException` - if `applications` is null.
    `SecurityException` - if deleting an application instance is not granted.
  See Also:
    `Event`

### delete

    public boolean delete()

  Attempts to unregister and delete this application instance. If other deployment units or application instances are still holding references to objects owned and bound to the namespace of this application instance the deletion will be denied.

  Before attempting to delete an application instance, any application which registered for such event (`event:///standard/app/deleting`) is notified.

  After successfully deleting an application instance, any application which registered for such event (`event:///standard/app/deleted`) is notified.

  Returns:
    true if the deletion succeeded, false otherwise.
  Throws:
    `SecurityException` - if deleting an application instance is not granted.
  See Also:
    `Event`

### getApplicationGroup

    public final ApplicationGroup getApplicationGroup()

  Returns this applications instance's application group.

  Returns:
    this applications instance's application group.

### getAppURI

    public final String getAppURI()

  Returns this applications instance's application URI.

  Returns:
    this applications instance's application URI.

### getModuleName

    public String getModuleName()

  Returns this application instance's module name.

  Returns:
    this application instance's module name.

### getType

    public final byte getType()

  Returns this applications instance's application type.

  Returns:
    this applications instance's application type.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.