Interface MultiSelectable
-
public interface MultiSelectable
TheMultiSelectable
interface identifies the implementing Applet subclass as being capable of concurrent selections. A multiselectable applet is a subclass ofjavacard.framework.Applet
which directly or indirectly implements this interface. All of the applets within an applet package must be multiselectable. If they are not, then none of the applets can be multiselectable.An instance of a multiselectable applet can be selected on one logical channel while the same applet instance or another applet instance from within the same package is active on another logical channel.
The methods of this interface are invoked by the Java Card runtime environment only when:
- the same applet instance is still active on another logical channel, or
- another applet instance from the same package is still active on another logical channel.
See Runtime Environment Specification, Java Card Platform, Classic Edition for details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deselect(boolean appInstStillActive)
Called by the Java Card runtime environment to inform that this currently selected applet instance is being deselected on this logical channel while the same applet instance or another applet instance from the same package is still active on another logical channel.boolean
select(boolean appInstAlreadyActive)
Called by the Java Card runtime environment to inform that this applet instance has been selected while the same applet instance or another applet instance from the same package is active on another logical channel.
-
-
-
Method Detail
-
select
boolean select(boolean appInstAlreadyActive)
Called by the Java Card runtime environment to inform that this applet instance has been selected while the same applet instance or another applet instance from the same package is active on another logical channel.It is called either when the MANAGE CHANNEL APDU (open) command or the SELECT APDU command is received and before the applet instance is selected. SELECT APDU commands use instance AID bytes for applet selection. See Runtime Environment Specification, Java Card Platform, Classic Edition, section 4.5 for details.
A subclass of
Applet
should, within this method, perform any initialization that may be required to process APDU commands that may follow. This method returns a boolean to indicate that it is ready to accept incoming APDU commands via itsprocess()
method. If this method returns false, it indicates to the Java Card runtime environment that this applet instance declines to be selected.Note:
- The
javacard.framework.Applet.select(
) method is not called if this method is invoked.
- Parameters:
appInstAlreadyActive
- boolean flag istrue
when the same applet instance is already active on another logical channel andfalse
otherwise- Returns:
true
if the applet instance accepts selection,false
otherwise
- The
-
deselect
void deselect(boolean appInstStillActive)
Called by the Java Card runtime environment to inform that this currently selected applet instance is being deselected on this logical channel while the same applet instance or another applet instance from the same package is still active on another logical channel. After deselection, this logical channel will be closed or another applet instance (or the same applet instance) will be selected on this logical channel. It is called when a SELECT APDU command or a MANAGE CHANNEL (close) command is received by the Java Card runtime environment. This method is called prior to invoking either another applet instance's or this applet instance'sselect()
method.A subclass of
Applet
should, within this method, perform any cleanup or bookkeeping work before another applet instance is selected or the logical channel is closed.Notes:
- The
javacard.framework.Applet.deselect(
) method is not called if this method is invoked. - Unchecked exceptions thrown by this method are caught and ignored by the Java Card runtime environment but the applet instance is deselected.
- The Java Card runtime environment does NOT clear any transient objects of
JCSystem.CLEAR_ON_DESELECT
clear event type owned by this applet instance since at least one applet instance from the same package is still active. - This method is NOT called on reset or power loss.
- Parameters:
appInstStillActive
- boolean flag istrue
when the same applet instance is still active on another logical channel andfalse
otherwise
- The
-
-