The RestartableTasks sample demonstrates how a registered task can be automatically available after the card is reset. The sample registers a task that serves data via an HTTP connection to the client.This sample contains two web applications, InfoClient and InfoServer, that demonstrate a registered task that is available after the card is reset.
Running the RestartableTasks sample consists of using the IDE to open the InfoClient and the InfoServer projects, starting the InfoClient and InfoServer applications, and clicking the Register Ping Service hyperlink to display the JCPingServer page. The server is stopped and restarted and the JCPingServer page is displayed.
Before performing the following procedure, the Java Card 3 Development Kit, Connected Editon must be downloaded and installed on your development system.
The InfoClient and the InfoServer projects are located under the JC_CONNECTED_HOME\samples\web\RestartableTasks folder.
Note - Refer to the Java Card 3 Platform Development Kit User’s Guide for additional details including screen captures.
The IDE compiles, builds, and runs the InfoServer application. When the application runs, the IDE launches the default browser and displays the Restartable Tasks page.
The IDE compiles, builds, and runs the InfoClient application. When the InfoClient application runs, the hit number is incremented in the output and a different text message is displayed.
The hit number in the output text continues to increment from the previous value.