Java Doc for ToolkitInterface.java in  » 6.0-JDK-Modules » j2me » sim » toolkit » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » sim.toolkit 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


sim.toolkit.ToolkitInterface

All known Subclasses:   sim.toolkit.SATBaseApplet,
ToolkitInterface
public interface ToolkitInterface extends Shareable(Code)
This interface must be implemented by a Toolkit applet (which extends the javacard.framework.Applet class) so that it can be triggered by the Toolkit Handler according to the registration information. The Toolkit applet will have to implement the processToolkit shared method so that it can be notified of the following events : EVENT_PROFILE_DOWNLOAD EVENT_FORMATTED_SMS_PP_ENV EVENT_FORMATTED_SMS_PP_UPD EVENT_UNFORMATTED_SMS_PP_ENV EVENT_UNFORMATTED_SMS_PP_UPD EVENT_UNFORMATTED_SMS_CB EVENT_MENU_SELECTION EVENT_MENU_SELECTION_HELP_REQUEST EVENT_CALL_CONTROL_BY_SIM EVENT_MO_SHORT_MESSAGE_CONTROL_BY_SIM EVENT_TIMER_EXPIRATION EVENT_EVENT_DOWNLOAD_MT_CALL EVENT_EVENT_DOWNLOAD_CALL_CONNECTED EVENT_EVENT_DOWNLOAD_CALL_DISCONNECTED EVENT_EVENT_DOWNLOAD_LOCATION_STATUS EVENT_EVENT_DOWNLOAD_USER_ACTIVITY EVENT_EVENT_DOWNLOAD_IDLE_SCREEN_AVAILABLE EVENT_EVENT_DOWNLOAD_CARD_READER_STATUS EVENT_STATUS_COMMAND EVENT_UNRECOGNIZED_ENVELOPE Toolkit applet example :

 import javacard.framework.*;
 import sim.toolkit.*;
 //
 // The HelloWorld class is a simple Toolkit applet, which may be used as an
 // example to show how such an applet will be installed and registered and
 // how it will be triggered.
 //
 public class HelloWorld extends Applet implements 
 ToolkitInterface,ToolkitConstants {
 // data fields
 private static final byte CMD_QUALIFIER = (byte)0x80;
 private byte[] menuEntry = {'S','e','r','v','i','c','e','1'};
 private byte[] textBuf = {'H','e','l','l','o',' ',
 'w','o','r','l','d',' ','!'};
 private ToolkitRegistry reg;
 //
 // Constructor of applet
 //
 public HelloWorld() {
 // get a Registry object...
 // ...and initialize it according to the applet characteristics
 reg.initMenuEntry(menuEntry, (short)0, (short)menuEntry.length, 
 PRO_CMD_DISPLAY_TEXT, false, 0, 0);
 }
 //
 // Install method
 // *param bArray the array containing installation parameters
 // *param bOffset the starting offset in bArray
 // *param bLength the length in bytes of the parameter data in bArray
 //
 public static void install(byte bArray[], short bOffset, byte bLength) 
 throws ISOException {
 // create and register applet
 HelloWorld HelloWorldApplet = new HelloWorld();
 HelloWorldApplet.register();
 }
 //
 // Process toolkit events
 // *param event the type of event to be processed
 // *exception ToolkitException
 //
 public void processToolkit(byte event) throws ToolkitException {
 // get the ProactiveHandler system instance
 ProactiveHandler proHdlr = ProactiveHandler.getTheHandler();
 if (event == EVENT_MENU_SELECTION) {
 // prepare a Display Text command
 proHdlr.init((byte) PRO_CMD_DISPLAY_TEXT, 
 (byte)CMD_QUALIFIER, (byte)0x02);
 proHdlr.appendTLV((byte)(TAG_TEXT_STRINGTAG_SET_CR), textBuf,
 (short)0, (short)textBuf.length);
 proHdlr.send();
 }
 }
 }
 

version:
   8.3.0
See Also:   ToolkitRegistry
See Also:   ToolkitException
See Also:   ToolkitConstants




Method Summary
public  byte[]getAPDUBuffer()
     Returns the APDUBuffer.
public  ToolkitExceptiongetToolkitExceptionInstance()
     Returns the ToolkitException instance.
public  voidprocessToolkit(byte event)
     This method is the standard toolkit event handling method of a Toolkit applet and is called by the Toolkit Handler to process the current Toolkit event.



Method Detail
getAPDUBuffer
public byte[] getAPDUBuffer() throws ToolkitException(Code)
Returns the APDUBuffer. apdu buffer
throws:
  ToolkitException - if an error occures



getToolkitExceptionInstance
public ToolkitException getToolkitExceptionInstance()(Code)
Returns the ToolkitException instance. ToolkitException instance



processToolkit
public void processToolkit(byte event) throws ToolkitException(Code)
This method is the standard toolkit event handling method of a Toolkit applet and is called by the Toolkit Handler to process the current Toolkit event. This method is invoked for notification of registered events.
Parameters:
  event - the type of event to be processed.
exception:
  ToolkitException -
See Also:   sim.toolkit.ToolkitRegistry.getEntry
See Also:   



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.