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


java.lang.Object
   com.sun.j2me.payment.TransactionStorageImpl

TransactionStorageImpl
class TransactionStorageImpl (Code)
This class extends RMS API to implement blocked operations for Transaction Store The com.sun.midp.rms.RecordStoreImpl class is used to access Transaction Store The global native mutex is used to manage access to Transaction Store
See Also:   RecordStoreImpl
version:
   1.1


Field Summary
final static  StringPAYMENT_FILE_NAME
     The name of the RMS where to store the transaction records.
final static  intPAYMENT_SUITEID_NAME
     The name of the SuiteId where to store the transaction records.

Constructor Summary
 TransactionStorageImpl(SecurityToken token, boolean create)
     Constructor.

Method Summary
 intaddRecord(byte[] data)
     Adds a new record into the Transaction Store
Parameters:
  data - the data to be stored in this record.
public  voidcloseStore()
     Close Transaction Store and unlocks it.
 voiddeleteRecord(int recordId)
     Delete record from the Transaction Store.
static  voiddeleteStore(SecurityToken token)
    
 intgetNumRecords()
     Returns the number of records currently in the Transaction Store.
public  byte[]getRecord(int recordId)
     Returns a copy of the data stored in the given record.
Parameters:
  recordId - the ID of the record to use in this operation
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  InvalidRecordIDException - if the recordId is invalid
exception:
  RecordStoreException - if a general record storeexception occurs the data stored in the given record.
 int[]getRecordIDs()
     Returns all of the recordId's currently in the Transaction Store.
public  intgetRecordSize(int recordId)
     Returns the size (in bytes) of the record.
 voidsetRecord(int recordId, byte[] newData)
    

Field Detail
PAYMENT_FILE_NAME
final static String PAYMENT_FILE_NAME(Code)
The name of the RMS where to store the transaction records.



PAYMENT_SUITEID_NAME
final static int PAYMENT_SUITEID_NAME(Code)
The name of the SuiteId where to store the transaction records.




Constructor Detail
TransactionStorageImpl
TransactionStorageImpl(SecurityToken token, boolean create) throws RecordStoreException, RecordStoreFullException, RecordStoreNotFoundException(Code)
Constructor. Opens Transaction Store location and locks it If the Transaction Store is already locked the calling thread is blocking untill Transaction Store is unlocked
Parameters:
  token - security token for authorization
Parameters:
  create - if true, create the record store if it doesn't exist
exception:
  RecordStoreException - if something goes wrong setting upthe new RecordStore.
exception:
  RecordStoreNotFoundException - if can't find the record storeand create is set to false.
exception:
  RecordStoreFullException - if there is no room in storageto create a new record store
See Also:   com.sun.midp.rms.RecordStoreImpl.openRecordStore




Method Detail
addRecord
int addRecord(byte[] data) throws RecordStoreNotOpenException, RecordStoreException, RecordStoreFullException(Code)
Adds a new record into the Transaction Store
Parameters:
  data - the data to be stored in this record. the recordId for the new record
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  RecordStoreException - if a different recordstore-related exception occurred
exception:
  RecordStoreFullException - if the operation cannot becompleted because the record store has no more room
exception:
  SecurityException - if the MIDlet has read-only accessto the RecordStore
See Also:   com.sun.midp.rms.RecordStoreImpl.addRecord



closeStore
public void closeStore() throws RecordStoreNotOpenException, RecordStoreException(Code)
Close Transaction Store and unlocks it. All threads waiting for Transaction Store will be unblocked
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  RecordStoreException - if a different recordstore-related exception occurred
See Also:   com.sun.midp.rms.RecordStoreImpl.closeRecordStore



deleteRecord
void deleteRecord(int recordId) throws RecordStoreNotOpenException, InvalidRecordIDException, RecordStoreException(Code)
Delete record from the Transaction Store.
Parameters:
  recordId - the ID of the record to delete
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  InvalidRecordIDException - if the recordId is invalid
exception:
  RecordStoreException - if a general record storeexception occurs
See Also:   com.sun.midp.rms.RecordStoreImpl.deleteRecord



deleteStore
static void deleteStore(SecurityToken token) throws RecordStoreException, RecordStoreNotFoundException(Code)
Deletes Transaction Store
Parameters:
  token - security token for authorization
exception:
  RecordStoreException - if a record store-relatedexception occurred
exception:
  RecordStoreNotFoundException - if the record storecould not be found
See Also:   com.sun.midp.rms.RecordStoreImpl.deleteRecordStore



getNumRecords
int getNumRecords() throws RecordStoreNotOpenException(Code)
Returns the number of records currently in the Transaction Store. the number of records currently in the record store
exception:
  RecordStoreNotOpenException - if the record store isnot open
See Also:   com.sun.midp.rms.RecordStoreImpl.getNumRecords



getRecord
public byte[] getRecord(int recordId) throws RecordStoreNotOpenException, InvalidRecordIDException, RecordStoreException(Code)
Returns a copy of the data stored in the given record.
Parameters:
  recordId - the ID of the record to use in this operation
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  InvalidRecordIDException - if the recordId is invalid
exception:
  RecordStoreException - if a general record storeexception occurs the data stored in the given record. Note that if therecord has no data, this method will return null.
See Also:   com.sun.midp.rms.RecordStoreImpl.getRecord



getRecordIDs
int[] getRecordIDs() throws RecordStoreNotOpenException(Code)
Returns all of the recordId's currently in the Transaction Store.
exception:
  RecordStoreNotOpenException - if the record store isnot open an array of the recordId's currently in the record storeor null if the record store is closed.
See Also:   com.sun.midp.rms.RecordStoreImpl.getRecordIDs



getRecordSize
public int getRecordSize(int recordId) throws RecordStoreNotOpenException, InvalidRecordIDException, RecordStoreException(Code)
Returns the size (in bytes) of the record.
Parameters:
  recordId - the ID of the record to use in this operation the size (in bytes) of the MIDlet data availablein the given record
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  InvalidRecordIDException - if the recordId is invalid
exception:
  RecordStoreException - if a general record storeexception occurs
See Also:   com.sun.midp.rms.RecordStoreImpl.getRecordSize



setRecord
void setRecord(int recordId, byte[] newData) throws RecordStoreNotOpenException, InvalidRecordIDException, RecordStoreException, RecordStoreFullException(Code)
Updates content of the record in the Transaction Store
Parameters:
  recordId - the ID of the record to use in this operation
Parameters:
  newData - the new data to store in the record
exception:
  RecordStoreNotOpenException - if the record store isnot open
exception:
  InvalidRecordIDException - if the recordId is invalid
exception:
  RecordStoreException - if a general record storeexception occurs
exception:
  RecordStoreFullException - if the operation cannot becompleted because the record store has no more room
See Also:   com.sun.midp.rms.RecordStoreImpl.setRecord



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.