Java Doc for Protocol.java in  » 6.0-JDK-Modules » j2me » com » sun » io » j2me » jcrmi » 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 » com.sun.io.j2me.jcrmi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.io.j2me.jcrmi.Protocol

Protocol
public class Protocol implements JavaCardRMIConnection,ConnectionBaseInterface,StreamConnection(Code)
JCRMI connection to card application.




Method Summary
public  shortchangePin(int pinID)
     A call to changePin method pops up a UI that requests the user for an old or existing PIN value and the new PIN value to to change the value of the PIN.
public  voidclose()
     Closes the connection.
public  shortdisablePin(int pinID)
     A call to disablePin method pops up a UI that requests the user to enter the value for the PIN that is to be disabled. The pinID field indicates which PIN is to be disabled.
public  shortenablePin(int pinID)
     A call to enablePin method pops up a UI that requests the user to enter the value for the PIN that is to be enabled. The pinID field indicates which PIN is to be enabled.
public  shortenterPin(int pinID)
     A call to enterPin method pops up a UI that requests the PIN from the user.
 intgetCardSessionId()
     Returns the card session identifier for this connection.
public  java.rmi.RemotegetInitialReference()
     Returns the stub object for an initial remote reference.
 Objectinvoke(Reference ref, String method, Object[] params)
     Invokes a remote method. The remote method invoked on the card can throw an exception to signal that an unexpected condition has been detected.

If the exception thrown on the card is an exception defined in the Java Card 2.2 API, then the same exception is thrown to the stub method.

 booleanisOpened()
     Returns the flag that indicates if connection is open.
public  DataInputStreamopenDataInputStream()
     Open and return a data input stream for a connection.
public  DataOutputStreamopenDataOutputStream()
     Open and return a data output stream for a connection.
public  InputStreamopenInputStream()
     Open and return an input stream for a connection.
public  OutputStreamopenOutputStream()
     Open and return an output stream for a connection.
public  ConnectionopenPrim(String name, int mode, boolean timeouts)
     Connector uses this method to initialize the connection object. This method establishes APDU connection with card application, obtains FCI information and creates stub for initial remote reference.
Parameters:
  name - the URL for the connection without protocol name
Parameters:
  mode - the access mode (Ignored)
Parameters:
  timeouts - a flag to indicate that the caller wants timeoutexceptions.
public  shortunblockPin(int blockedPinID, int unblockingPinId)
     This is a high-level method that lets the J2ME application ask the user to enter the value for an unblocking PIN, and the new value for the blocked PIN and send these to the card. A call to unblockPin method pops up a UI that requests the user to enter the value for the unblocking PIN and the new value for the blocked PIN. The unblockingPinID field indicates which unblocking PIN is to be used to unblock the blocked PIN which is indicated by the field blockedPinId. The unblockingPinID field indicates which PIN is to be unblocked. The user can either cancel the request or continue.



Method Detail
changePin
public short changePin(int pinID) throws RemoteException(Code)
A call to changePin method pops up a UI that requests the user for an old or existing PIN value and the new PIN value to to change the value of the PIN. The pinID field indicates which PIN is to be changed. The user can either cancel the request or continue. If the user enters the PIN values and chooses to continue the implementation is responsible for presenting the the old and new values of the PIN to the card.
Parameters:
  pinID - the type of PIN the implementation is suppose to promptthe user to change. PINENTRY_CANCELLED if the user cancelled the PIN entryrequest or the value returned by the remote method.
exception:
  java.rmi.RemoteException - is thrown if the PIN couldnot be communicated to the card or an exception is thrownby the card in response to the PIN entry.
exception:
  SecurityException - is thrown if the J2ME application doesnot have appropriate rights to ask for changing the PIN value.



close
public void close() throws IOException(Code)
Closes the connection.
throws:
  IOException - If an I/O error occurs



disablePin
public short disablePin(int pinID) throws RemoteException(Code)
A call to disablePin method pops up a UI that requests the user to enter the value for the PIN that is to be disabled. The pinID field indicates which PIN is to be disabled. The user can either cancel the request or continue. If the user enters the PIN and chooses to continue the implementation is responsible for presenting the PIN value to the card to disable PIN.
Parameters:
  pinID - the type of PIN the implementation is required to promptthe user to enter. PINENTRY_CANCELLED if the user cancelled the PIN entryrequest or the value returned by the remote method.
exception:
  java.rmi.RemoteException - is thrown if the PIN couldnot be communicated to the card or an exception is thrownby the card in response to the PIN entry.
exception:
  SecurityException - is thrown if the J2ME application doesnot have appropriate rights to ask for disabling the PIN.



enablePin
public short enablePin(int pinID) throws RemoteException(Code)
A call to enablePin method pops up a UI that requests the user to enter the value for the PIN that is to be enabled. The pinID field indicates which PIN is to be enabled. The user can either cancel the request or continue. If the user enters the PIN and chooses to continue the implementation is responsible for presenting the PIN value to the card for enabling the PIN.
Parameters:
  pinID - the type of PIN the implementation is required to promptthe user to enter. PINENTRY_CANCELLED if the user cancelled the PIN entryrequest or the value returned by the remote method.
exception:
  java.rmi.RemoteException - is thrown if the PIN couldnot be communicated to the card or an exception is thrownby the card in response to the PIN entry.
exception:
  SecurityException - is thrown if the J2ME application doesnot have appropriate rights to ask for enabling the PIN.



enterPin
public short enterPin(int pinID) throws java.rmi.RemoteException(Code)
A call to enterPin method pops up a UI that requests the PIN from the user. The pinID field indicates which PIN must be requested from the user. The user can either cancel the request or continue. If the user enters the PIN and chooses to continue, The implementation is responsible for presenting the PIN entered by the user to the card for verification.
Parameters:
  pinID - the type of PIN the implementation is suppose to promptthe user to enter. PINENTRY_CANCELLED if the user cancelled the PIN entryrequest or the value returned by the remote method.
exception:
  java.rmi.RemoteException - is thrown if the PIN couldnot be communicated to the card or an exception is thrownby the card in response to the PIN entry.
exception:
  SecurityException - is thrown if the J2ME application doesnot have appropriate rights to ask for PIN verification.



getCardSessionId
int getCardSessionId()(Code)
Returns the card session identifier for this connection. the card session identifier



getInitialReference
public java.rmi.Remote getInitialReference()(Code)
Returns the stub object for an initial remote reference. the initial remote reference



invoke
Object invoke(Reference ref, String method, Object[] params) throws Exception(Code)
Invokes a remote method. The remote method invoked on the card can throw an exception to signal that an unexpected condition has been detected.

If the exception thrown on the card is an exception defined in the Java Card 2.2 API, then the same exception is thrown to the stub method. The client can access the reason code associated with Java Card-specific exceptions using the standard getReason() method.

If the exception thrown on the card is a subclass of an exception defined in the Java Card 2.2 API, then the closest exception defined in the API (along with the reason code, if applicable) is thrown to the stub method. The detail message string of the exception object may indicate that exception subclass was thrown on the card.

Apart from the exceptions thrown by the remote method itself, errors during communication, marshalling, protocol handling, unmarshalling, stub object instantiation, and so on, related to the JCRMI method invocation, results in a RemoteException being thrown to the stub method.
Parameters:
  ref - handle for remote object
Parameters:
  method - simple (not fully qualified) name of the methodfollowed by the method descriptor. Representation of amethod descriptor is the same as that described in TheJava Virtual Machine Specification (§ 4.3.3)
Parameters:
  params - the parameter list result of remote method invocation
exception:
  java.lang.Exception - if any exception occurs duringthe remote method invocation




isOpened
boolean isOpened()(Code)
Returns the flag that indicates if connection is open. true if the connection is open



openDataInputStream
public DataInputStream openDataInputStream()(Code)
Open and return a data input stream for a connection. This method always throw IllegalArgumentException. An input stream
exception:
  IllegalArgumentException - is thrown for all requests



openDataOutputStream
public DataOutputStream openDataOutputStream()(Code)
Open and return a data output stream for a connection. This method always throw IllegalArgumentException. An output stream
exception:
  IllegalArgumentException - is thrown for all requests



openInputStream
public InputStream openInputStream()(Code)
Open and return an input stream for a connection. This method always throw IllegalArgumentException. An input stream
exception:
  IllegalArgumentException - is thrown for all requests



openOutputStream
public OutputStream openOutputStream()(Code)
Open and return an output stream for a connection. This method always throw IllegalArgumentException. An output stream
exception:
  IllegalArgumentException - is thrown for all requests



openPrim
public Connection openPrim(String name, int mode, boolean timeouts) throws IOException(Code)
Connector uses this method to initialize the connection object. This method establishes APDU connection with card application, obtains FCI information and creates stub for initial remote reference.
Parameters:
  name - the URL for the connection without protocol name
Parameters:
  mode - the access mode (Ignored)
Parameters:
  timeouts - a flag to indicate that the caller wants timeoutexceptions. Ignored this connection
throws:
  IOException - if the connection can not be initialized
throws:
  RemoteException - if initial remote reference object can not becreated
throws:
  SecurityException - if access is restricted by ACL



unblockPin
public short unblockPin(int blockedPinID, int unblockingPinId) throws RemoteException(Code)
This is a high-level method that lets the J2ME application ask the user to enter the value for an unblocking PIN, and the new value for the blocked PIN and send these to the card. A call to unblockPin method pops up a UI that requests the user to enter the value for the unblocking PIN and the new value for the blocked PIN. The unblockingPinID field indicates which unblocking PIN is to be used to unblock the blocked PIN which is indicated by the field blockedPinId. The unblockingPinID field indicates which PIN is to be unblocked. The user can either cancel the request or continue. If the user enters the PIN values and chooses to continue, the implementation is responsible for presenting the PIN values to the card for unblocking the blocked PIN. If padding is required for either of the PIN values, the implementation is responsible for providing appropriate padding.
Parameters:
  blockedPinID - the Id of PIN that is to be unblocked.
Parameters:
  unblockingPinId - the Id of unblocking PIN. PINENTRY_CANCELLED if the user cancelled the PIN entryrequest or the value returned by the remote method.
exception:
  java.rmi.RemoteException - is thrown if the PIN couldnot be communicated to the card or an exception is thrownby the card in response to the PIN entry.
exception:
  SecurityException - is thrown if the J2ME application doesnot have appropriate rights to ask for unblocking the PIN.



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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