日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

java card applet_可多选的javacard applet | 学步园

發(fā)布時間:2023/11/27 生活经验 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java card applet_可多选的javacard applet | 学步园 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

可多選的javacard applet,與多個邏輯通道上設(shè)置各自不同的applet是有區(qū)別的。

Java Card 2.2支持邏輯通道(logical channels)的概念,允許最多智能卡中的16個應(yīng)用程序會話同時開啟,每個邏輯通道一個會話。因為卡片中的APDU的處理不能中斷,并且每個APDU包含一個到邏輯通道(在CLA字節(jié))的引用,變動的APDU可以擬同步地訪問卡片上的許多小應(yīng)用程序。

你可以設(shè)計一個小應(yīng)用程序被多次選擇;也就是說,每次和一個以上邏輯通道通信。多選的小應(yīng)用程序必須實現(xiàn)

javacard.Framework.MultiSelectable接口和相應(yīng)方法。

4.2 Multiselectable Applets

Applets having the capability of being selected on multiple logical channels at the same time, or accepting other applets belonging to the same package being selected simultaneously, are referred to as multiselectable applets.

Note –?All applets within a package shall be multiselectable or none shall be.

An applet’s context is active when either an instance of the applet is already active, or when another applet instance from the same package is active. For more information about contexts see?Section?6.1.2 "Contexts and Context Switching.” An attempt to select an applet instance when the applet’s context is active, is referred to as a?multiselection?attempt. If successful, multiselection occurs, and the applet instance becomes multiselected.

Multiselectable applets shall implement thejavacard.framework.MultiSelectableinterface. In case of multiselection, the applet instance will be informed by invoking its methods?MultiSelectable.select?andMultiSelectable.deselectduring selection and deselection respectively.

When an applet instance not currently active is the first one selected in its package, its?Applet.select?method is called. Subsequent multiselections to this applet instance or selection of other applet instances in the same package shall result in a call to?MultiSelectable.select?method. This method is defined in the?MultiSelectable?interface. Its only purpose is to inform the applet instance that it will be multiselected. The applet instance may accept or reject a multiselection attempt.

If a multiselection attempt is made on an applet which does not implement the?MultiSelectable?interface, the selection shall be rejected by the Java Card RE.

When a multiselected applet instance is deselected from one of the logical channels, the method?MultiSelectable.deselect?is called. Only when the multiselected applet instance is the last active applet instance in the applet’s context, is its regular method?Applet.deselect?called.

There are two cases of multiselection:

When two distinct applet instances from within the same package are multiselected, each applet instance shares the same?CLEAR_ON_DESELECTmemory transient segment. The applet instances share objects within the context firewall as well as their transient data. The Java Card RE shall not reset this?CLEAR_ON_DESELECT?transient objects until all applet instances within the package are deselected.(Refer to?FIGURE?2.)

FIGURE?2??–??Different applet instances in same package

When the same applet instance is multiselected on two different logical channels simultaneously, it shares the?CLEAR_ON_DESELECT?memory segment space across logical channels. The Java Card RE shall not reset theCLEAR_ON_DESELECT?transient objects until all applet instances within the package are deselected. (Refer to?FIGURE?3.)

FIGURE?3??–??Same applet instance selected on multiple logical channels

In both cases of multiselection described above, the applet(s) must implement the?MultiSelectable?interface. If the applet(s) do not support this feature, then the selection must be rejected by the Java Card RE.

Method Summary

void

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

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.

總結(jié)

以上是生活随笔為你收集整理的java card applet_可多选的javacard applet | 学步园的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。