JCSystem (Java Card API, Connected Edition)
Date: 2009-12-11

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

## javacard.framework
Class JCSystem

    java.lang.Object
      javacard.framework.JCSystem

    @TransactionType(value=NOT_SUPPORTED)
    public final class JCSystem

extends Object

The `JCSystem` class includes a collection of methods to control applet execution, resource management, atomic transaction management, object deletion mechanism and inter-applet object sharing in the Java Card environment. All methods in `JCSystem` class are static methods.

This class also includes methods to control the persistence and transience of objects. The term persistent means that objects and their values persist from one CAD session to the next, indefinitely. Persistent object values are updated atomically using transactions.

The `makeTransient...Array()` methods can be used to create transient arrays. Transient array data is lost (in an undefined state, but the real data is unavailable) immediately upon power loss, and is reset to the default value at the occurrence of certain events such as card reset or deselect. Updates to the values of transient arrays are not atomic and are not affected by transactions.

The Java Card runtime environment maintains an atomic transaction commit buffer which is initialized on card reset (or power on). When a transaction is in progress, the Java Card runtime environment journals all updates to persistent data space into this buffer so that it can always guarantee, at commit time, that everything in the buffer is written or nothing at all is written. The `JCSystem` includes methods to control an atomic transaction. See Runtime Environment Specification, Java Card Platform, Connected Edition, chapter 2, for details.

See Also:
  `SystemException`, `TransactionException`, `Applet`

Field Summary
`static byte` | `CLEAR_ON_DESELECT` This event code indicates that the contents of the transient object are cleared to the default value on applet deselection event or in `CLEAR_ON_RESET` cases.
`static byte` | `CLEAR_ON_RESET` This event code indicates that the contents of the transient object are cleared to the default value on card reset (or power on) event.
`static byte` | `MEMORY_TYPE_PERSISTENT` Constant to indicate persistent memory type.
`static byte` | `MEMORY_TYPE_TRANSIENT_DESELECT` Constant to indicate transient memory of CLEAR_ON_DESELECT type.
`static byte` | `MEMORY_TYPE_TRANSIENT_RESET` Constant to indicate transient memory of CLEAR_ON_RESET type.
`static byte` | `NOT_A_TRANSIENT_OBJECT` This event code indicates that the object is not transient.

Method Summary
`static void` | `abortTransaction()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static void` | `beginTransaction()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static void` | `commitTransaction()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static AID` | `getAID()` Returns the Java Card runtime environment-owned instance of the `AID` object associated with the current applet context, or `null` if the `Applet.register()` method has not yet been invoked or if called from the context of a Web Application.
`static Shareable` | `getAppletShareableInterfaceObject(AID serverAID, byte parameter)` Called by a client applet to get a server applet's shareable interface object.
`static byte` | `getAssignedChannel()` This method is called to obtain the logical channel number assigned to the currently selected applet instance.
`static short` | `getAvailableMemory(byte memoryType)` Obtains the amount of memory of the specified type that is available to the application.
`static short` | `getMaxCommitCapacity()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static AID` | `getPreviousContextAID()` Obtains the Java Card runtime environment-owned instance of the `AID` object associated with the previously active applet context.
`static byte` | `getTransactionDepth()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static short` | `getUnusedCommitCapacity()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.
`static short` | `getVersion()` Returns the current major and minor version of the Java Card API.
`static boolean` | `isAppletActive(AID theApplet)` This method is used to determine if the specified applet is active on the card.
`static boolean` | `isObjectDeletionSupported()` This method is used to determine if the implementation for the Java Card platform supports the object deletion mechanism.
`static byte` | `isTransient(Object theObj)` Checks if the specified object is transient.
`static AID` | `lookupAID(byte[] buffer, short offset, byte length)` Returns the Java Card runtime environment-owned instance of the `AID` object, if any, encapsulating the specified AID bytes in the `buffer` parameter if there exists a successfully installed applet on the card whose instance AID exactly matches that of the specified AID bytes.
`static boolean[]` | `makeTransientBooleanArray(short length, byte event)` Creates a transient boolean array with the specified array length.
`static byte[]` | `makeTransientByteArray(short length, byte event)` Creates a transient byte array with the specified array length.
`static Object[]` | `makeTransientObjectArray(short length, byte event)` Creates a transient array of `Object` with the specified array length.
`static short[]` | `makeTransientShortArray(short length, byte event)` Creates a transient short array with the specified array length.
`static void` | `requestObjectDeletion()` Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use `System.gc()` instead.

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

Field Detail

### MEMORY_TYPE_PERSISTENT

    public static final byte MEMORY_TYPE_PERSISTENT

  Constant to indicate persistent memory type.

  See Also:
    Constant Field Values

### MEMORY_TYPE_TRANSIENT_RESET

    public static final byte MEMORY_TYPE_TRANSIENT_RESET

  Constant to indicate transient memory of CLEAR_ON_RESET type.

  See Also:
    Constant Field Values

### MEMORY_TYPE_TRANSIENT_DESELECT

    public static final byte MEMORY_TYPE_TRANSIENT_DESELECT

  Constant to indicate transient memory of CLEAR_ON_DESELECT type.

  See Also:
    Constant Field Values

### NOT_A_TRANSIENT_OBJECT

    public static final byte NOT_A_TRANSIENT_OBJECT

  This event code indicates that the object is not transient.

  See Also:
    Constant Field Values

### CLEAR_ON_RESET

    public static final byte CLEAR_ON_RESET

  This event code indicates that the contents of the transient object are cleared to the default value on card reset (or power on) event.

  See Also:
    Constant Field Values

### CLEAR_ON_DESELECT

    public static final byte CLEAR_ON_DESELECT

  This event code indicates that the contents of the transient object are cleared to the default value on applet deselection event or in `CLEAR_ON_RESET` cases.

  Notes:

  - `CLEAR_ON_DESELECT` transient objects can be accessed only when the applet which created the object is in the same context as the currently selected applet.
  - The Java Card runtime environment will throw a `SecurityException` if a `CLEAR_ON_DESELECT` transient object is accessed when the currently selected applet is not in the same context as the applet which created the object.

  See Also:
    Constant Field Values

Method Detail

### isTransient

    public static byte isTransient(Object theObj)

  Checks if the specified object is transient.

  This method returns a constant indicator as follows :

  - `MEMORY_TYPE_TRANSIENT_RESET` if the specified object is a `CLEAR_ON_RESET` transient array created by one of the `makeTransient...Array` methods using a `CLEAR_ON_RESET` event code or if the specified object is an instance of the `TransientReference` class.
  - `MEMORY_TYPE_TRANSIENT_DESELECT` if the specified object is a `CLEAR_ON_DESELECT` transient array created by one of the `makeTransient...Array` methods using a `CLEAR_ON_DESELECT` event code.
  - `NOT_A_TRANSIENT_OBJECT` for all other objects.

  Parameters:
    `theObj` - the object being queried
  Returns:
    `NOT_A_TRANSIENT_OBJECT`, `CLEAR_ON_RESET`, or `CLEAR_ON_DESELECT`
  See Also:
    `makeTransientBooleanArray(short, byte)`, `makeTransientByteArray(short, byte)`, `makeTransientShortArray(short, byte)`, `makeTransientObjectArray(short, byte)`, `javacardx.framework.util.intx.JCint.makeTransientIntArray(short, byte)`, `TransientReference`

### makeTransientBooleanArray

    public static boolean[] makeTransientBooleanArray(short length,
                                                      byte event)
                                               throws NegativeArraySizeException,
                                                      SystemException

  Creates a transient boolean array with the specified array length.

  Note:

  - If called from a web application with a `CLEAR_ON_DESELECT` event parameter, this method throws a `SystemException` execption with reason code `SystemException.ILLEGAL_TRANSIENT`.

  Parameters:
    `length` - the length of the boolean array
    `event` - the `CLEAR_ON...` event which causes the array elements to be cleared
  Returns:
    the new transient boolean array
  Throws:
    `NegativeArraySizeException` - if the `length` parameter is negative
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_VALUE` if event is not a valid event code.
    - `SystemException.NO_TRANSIENT_SPACE` if sufficient transient space is not available.
    - `SystemException.ILLEGAL_TRANSIENT` if the current applet context is not the currently selected applet context and `CLEAR_ON_DESELECT` is specified.

### makeTransientByteArray

    public static byte[] makeTransientByteArray(short length,
                                                byte event)
                                         throws NegativeArraySizeException,
                                                SystemException

  Creates a transient byte array with the specified array length.

  Note:

  - If called from a web application with a `CLEAR_ON_DESELECT` event parameter, this method throws a `SystemException` execption with reason code `SystemException.ILLEGAL_TRANSIENT`.

  Parameters:
    `length` - the length of the byte array
    `event` - the `CLEAR_ON...` event which causes the array elements to be cleared
  Returns:
    the new transient byte array
  Throws:
    `NegativeArraySizeException` - if the `length` parameter is negative
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_VALUE` if event is not a valid event code.
    - `SystemException.NO_TRANSIENT_SPACE` if sufficient transient space is not available.
    - `SystemException.ILLEGAL_TRANSIENT` if the current applet context is not the currently selected applet context and `CLEAR_ON_DESELECT` is specified.

### makeTransientShortArray

    public static short[] makeTransientShortArray(short length,
                                                  byte event)
                                           throws NegativeArraySizeException,
                                                  SystemException

  Creates a transient short array with the specified array length.

  Note:

  - If called from a web application with a `CLEAR_ON_DESELECT` event parameter, this method throws a `SystemException` execption with reason code `SystemException.ILLEGAL_TRANSIENT`.

  Parameters:
    `length` - the length of the short array
    `event` - the `CLEAR_ON...` event which causes the array elements to be cleared
  Returns:
    the new transient short array
  Throws:
    `NegativeArraySizeException` - if the `length` parameter is negative
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_VALUE` if event is not a valid event code.
    - `SystemException.NO_TRANSIENT_SPACE` if sufficient transient space is not available.
    - `SystemException.ILLEGAL_TRANSIENT` if the current applet context is not the currently selected applet context and `CLEAR_ON_DESELECT` is specified.

### makeTransientObjectArray

    public static Object[] makeTransientObjectArray(short length,
                                                    byte event)
                                             throws NegativeArraySizeException,
                                                    SystemException

  Creates a transient array of `Object` with the specified array length.

  Note:

  - If called from a web application with a `CLEAR_ON_DESELECT` event parameter, this method throws a `SystemException` execption with reason code `SystemException.ILLEGAL_TRANSIENT`.

  Parameters:
    `length` - the length of the `Object` array
    `event` - the `CLEAR_ON...` event which causes the array elements to be cleared
  Returns:
    the new transient Object array
  Throws:
    `NegativeArraySizeException` - if the `length` parameter is negative
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_VALUE` if event is not a valid event code.
    - `SystemException.NO_TRANSIENT_SPACE` if sufficient transient space is not available.
    - `SystemException.ILLEGAL_TRANSIENT` if the current applet context is not the currently selected applet context and `CLEAR_ON_DESELECT` is specified.

### getVersion

    public static short getVersion()

  Returns the current major and minor version of the Java Card API.

  Returns:
    version number as byte.byte (major.minor)

### getAID

    public static AID getAID()

  Returns the Java Card runtime environment-owned instance of the `AID` object associated with the current applet context, or `null` if the `Applet.register()` method has not yet been invoked or if called from the context of a Web Application.

  Java Card runtime environment-owned instances of `AID` are permanent Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these permanent objects can be stored and re-used.

  See Runtime Environment Specification, Java Card Platform, Connected Edition, chapter 6 for details.

  Note:

  - This method returns `null` if called from the context of a Web Application.

  Returns:
    the `AID` object or `null`

### lookupAID

    public static AID lookupAID(byte[] buffer,
                                short offset,
                                byte length)

  Returns the Java Card runtime environment-owned instance of the `AID` object, if any, encapsulating the specified AID bytes in the `buffer` parameter if there exists a successfully installed applet on the card whose instance AID exactly matches that of the specified AID bytes.

  Java Card runtime environment-owned instances of `AID` are permanent Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these permanent objects can be stored and re-used.

  See Runtime Environment Specification, Java Card Platform, Connected Edition, chapter 6 for details.

  Parameters:
    `buffer` - byte array containing the AID bytes
    `offset` - offset within buffer where AID bytes begin
    `length` - length of AID bytes in buffer
  Returns:
    the `AID` object, if any; `null` otherwise. A VM exception is thrown if `buffer` is `null`, or if `offset` or `length` are out of range.

### beginTransaction

    public static void beginTransaction()
                                 throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Begins an atomic transaction. If a transaction is already in progress (transaction nesting depth level != 0), a TransactionException is thrown.

  Notes:

  - This method may do nothing if the `Applet.register()` method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.
  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.IN_PROGRESS` if a transaction is already in progress.
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.
  See Also:
    `commitTransaction()`, `abortTransaction()`

### abortTransaction

    public static void abortTransaction()
                                 throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Aborts the atomic transaction. The contents of the commit buffer is discarded.

  Notes:

  - This method may do nothing if the `Applet.register()` method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.
  - Do not call this method from within a transaction which creates new objects because the Java Card runtime environment may not recover the heap space used by the new object instances.
  - Do not call this method from within a transaction which creates new objects because the Java Card runtime environment may, to ensure the security of the card and to avoid heap space loss, lock up the card session to force tear/reset processing.
  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.NOT_IN_PROGRESS` if a transaction is not in progress.
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.
  See Also:
    `beginTransaction()`, `commitTransaction()`

### commitTransaction

    public static void commitTransaction()
                                  throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Commits an atomic transaction. The contents of commit buffer is atomically committed. If a transaction is not in progress (transaction nesting depth level == 0) then a TransactionException is thrown.

  Notes:

  - This method may do nothing if the `Applet.register()` method has not yet been invoked. In case of tear or failure prior to successful registration, the Java Card runtime environment will roll back all atomically updated persistent state.
  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.NOT_IN_PROGRESS` if a transaction is not in progress.
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.
  See Also:
    `beginTransaction()`, `abortTransaction()`

### getTransactionDepth

    public static byte getTransactionDepth()
                                    throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Returns the current transaction nesting depth level. At present, only 1 transaction can be in progress at a time.

  Note:

  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Returns:
    1 if transaction in progress, 0 if not
  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.

### getUnusedCommitCapacity

    public static short getUnusedCommitCapacity()
                                         throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Returns the number of bytes left in the commit buffer.

  Notes:

  - If the number of bytes left in the commit buffer is greater than 32767, then this method returns 32767.
  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Returns:
    the number of bytes left in the commit buffer
  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.
  See Also:
    `getMaxCommitCapacity()`

### getMaxCommitCapacity

    public static short getMaxCommitCapacity()
                                      throws TransactionException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use transaction annotation instead.

  Returns the total number of bytes in the commit buffer. This is approximately the maximum number of bytes of persistent data which can be modified during a transaction. However, the transaction subsystem requires additional bytes of overhead data to be included in the commit buffer, and this depends on the number of fields modified and the implementation of the transaction subsystem. The application cannot determine the actual maximum amount of data which can be modified during a transaction without taking these overhead bytes into consideration.

  Notes:

  - If the total number of bytes in the commit buffer is greater than 32767, then this method returns 32767.
  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a TransactionException with reason code TransactionException.ILLEGAL_USE. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Returns:
    the total number of bytes in the commit buffer
  Throws:
    `TransactionException` - with the following reason codes:
    - `TransactionException.ILLEGAL_USE` if called from a thread which does not own the Classic Applet Container Mutex Object.
  See Also:
    `getUnusedCommitCapacity()`

### getPreviousContextAID

    public static AID getPreviousContextAID()

  Obtains the Java Card runtime environment-owned instance of the `AID` object associated with the previously active applet context. This method is typically used by a server applet, while executing a shareable interface method to determine the identity of its client and thereby control access privileges.

  Java Card runtime environment-owned instances of `AID` are permanent Java Card runtime environment Entry Point Objects and can be accessed from any applet context. References to these permanent objects can be stored and re-used.

  See Runtime Environment Specification, Java Card Platform, Connected Edition, chapter 6 for details.

  Note:

  - This method returns `null` if the previous context is that of a Web Application or the Java Card runtime environment.

  Returns:
    the `AID` object of the previous context, or `null` if Java Card runtime environment, or if the previous context is that of a web application

### getAvailableMemory

    public static short getAvailableMemory(byte memoryType)
                                    throws SystemException

  Obtains the amount of memory of the specified type that is available to the application. Note that implementation-dependent memory overhead structures may also use the same memory pool.

  Notes:

  - The number of bytes returned is only an upper bound on the amount of memory available due to overhead requirements.
  - Allocation of CLEAR_ON_RESET transient objects may affect the amount of CLEAR_ON_DESELECT transient memory available.
  - Allocation of CLEAR_ON_DESELECT transient objects may affect the amount of CLEAR_ON_RESET transient memory available.
  - If the number of available bytes is greater than 32767, then this method returns 32767.
  - The returned count is not an indicator of the size of object which may be created since memory fragmentation is possible.

  Parameters:
    `memoryType` - the type of memory being queried. One of the `MEMORY_TYPE_*` constants defined above. See `MEMORY_TYPE_PERSISTENT`.
  Returns:
    the upper bound on available bytes of memory for the specified type
  Throws:
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_VALUE` if `memoryType` is not a valid memory type.

### getAppletShareableInterfaceObject

    public static Shareable getAppletShareableInterfaceObject(AID serverAID,
                                                              byte parameter)

  Called by a client applet to get a server applet's shareable interface object.

  This method returns `null` if:

  - the `Applet.register()` has not yet been invoked
  - the `serverAID` parameter is `null` or the server applet does not exist
  - the server applet returns `null`
  - the server applet throws an uncaught exception
  - called from the context of a Web Application
  Notes:
  - When invoked from an extended applet application or a web application, the Java Card RE must substitute an instance of an SIO synchronization proxy class corresponding to the SIO object being returned by a classic server applet. The SIO synchronization proxy instance MUST be owned by the classic application.

    If the classic server applet returns an SIO synchronization proxy instance for an SIO object owned by an extended applet or web application, the contained SIO object must be subsitituted instead.

  - When invoked from a classic application, the Java Card RE must substitute an instance of the SIO synchronization proxy class corresponding to the SIO object returned by the extended applet application. The SIO synchronization proxy instance MUST be owned by the classic application.

    If the extended applet application returns an SIOsynchronization proxy instance for an SIO object owned by an classic applet, the contained SIO object MUST be subsitituted instead.

  - To create a classic SIO synchronization proxy object, the Java Card RE must search for a suitable SIO proxy class for the SIO instance in the `proxy` subpackage of the package of the classic server or client applet or classic library. In that package, the Java Card RE must search for classes named Proxy1, Proxy2 .. It must pick the first proxy class which implements exactly the same set of Shareable interfaces that are implemented by the SIO instance. If an exact match is not found, it must pick the first proxy class which implements all the Shareable interfaces that are implemented by the SIO instance.

  See Runtime Environment Specification for the Java Card Platform, Connected Edition, chapter 4 for details regarding SIO synchronization proxy classes.

  Parameters:
    `serverAID` - the AID of the server applet
    `parameter` - optional parameter data
  Returns:
    the shareable interface object or `null`
  Throws:
    `SecurityException` - if the server applet is not multiselectable and is currently active on another logical channel
  See Also:
    `Applet.getShareableInterfaceObject(AID, byte)`

### isObjectDeletionSupported

    public static boolean isObjectDeletionSupported()

  This method is used to determine if the implementation for the Java Card platform supports the object deletion mechanism.

  Returns:
    `true` if the object deletion mechanism is supported, `false` otherwise

### requestObjectDeletion

    public static void requestObjectDeletion()
                                      throws SystemException

  Deprecated. Deprecated for extended applets and web applications on the Connected Edition of the Java Card 3 Platform. Use `System.gc()` instead.

  This method is invoked by the applet to trigger the object deletion service of the Java Card runtime environment. If the Java Card runtime environment implements the object deletion mechanism, the request is merely logged at this time. The Java Card runtime environment must schedule the object deletion service prior to the next invocation of the `Applet.process()` method. The object deletion mechanism must ensure that :
  - Any unreferenced persistent object owned by the current applet context is deleted and the associated space is recovered for reuse prior to the next invocation of the `Applet.process()` method.
  - Any unreferenced `CLEAR_ON_DESELECT` or `CLEAR_ON_RESET` transient object owned by the current applet context is deleted and the associated space is recovered for reuse before the next card reset session.

  Note:

  - This method can only be called in the context of the Classic applet. If this method is called from a thread which does not own the Classic Applet Container Mutex Object, this method throws a `SystemException` with reason code `SystemException.ILLEGAL_USE`. See the Runtime Environment Specification, Java Card Platform, Connected Edition chapters 2, 4 for more details.

  Throws:
    `SystemException` - with the following reason codes:
    - `SystemException.ILLEGAL_USE` if the object deletion mechanism is not implemented or if called from the context of an extended applet or web application.

### getAssignedChannel

    public static byte getAssignedChannel()

  This method is called to obtain the logical channel number assigned to the currently selected applet instance. The assigned logical channel is the logical channel on which the currently selected applet instance is or will be the active applet instance. This logical channel number is always equal to the origin logical channel number returned by the APDU.getCLAChannel() method except during selection and deselection via the MANAGE CHANNEL APDU command. If this method is called from the `Applet.select()`, `Applet.deselect(`), `MultiSelectable.select(boolean)` and `MultiSelectable.deselect(boolean)` methods during MANAGE CHANNEL APDU command processing, the logical channel number returned may be different.

  Note:

  - This method returns 0 if called from the context of a Web Application.

  Returns:
    the logical channel number in the range 0-19 assigned to the currently selected applet instance

### isAppletActive

    public static boolean isAppletActive(AID theApplet)

  This method is used to determine if the specified applet is active on the card.

  Note:

  - This method returns `false` if the specified applet is not active, even if its context is active.

  Parameters:
    `theApplet` - the AID of the applet object being queried
  Returns:
    `true` if and only if the applet specified by the AID parameter is currently active on this or another logical channel
  See Also:
    `lookupAID( byte[] buffer, short offset, byte length )`

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.