Java Doc for Store.java in  » 6.0-JDK-Modules » j2me » com » sun » midp » jump » push » executive » persistence » 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.midp.jump.push.executive.persistence 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.midp.jump.push.executive.persistence.Store

Store
final public class Store (Code)
Persistent store class for PushRegistry module.

IMPORTANT_NOTE: The clients of this class should ensure that content store manager passed into the constructor doesn't have exclusive lock when methods are invoked. Otherwise we'll face deadlocks.

NB: method getConnections guarantees that MIDlet suite without connections won't be listed, i.e. MIDletSuiteConnections.connections array is not empty

NB: this class has no intellegence of connection semantics, e.g. it doesn't handle connection conflicts. It's a simplistic database.

Implementation notice: as for now if MIDlet suite removes all the connections, the file with suite connections is not removed and the suite is filtered in method. Another option might be to remove the file.


Inner Class :public static interface ConnectionsConsumer
Inner Class :public static interface AlarmsConsumer

Field Summary
final static  StringALARMS_DIR
     Dir to store alarms.
final static  StringCONNECTIONS_DIR
     Dir to store connections.

Constructor Summary
public  Store(StoreOperationManager storeManager)
     Constructs a Store and reads the data.

Method Summary
public synchronized  voidaddAlarm(int midletSuiteID, String midlet, long time)
     Adds an alarm.
public synchronized  voidaddConnection(int midletSuiteID, JUMPConnectionInfo connection)
     Adds new registered connection.
public synchronized  voidaddConnections(int midletSuiteID, JUMPConnectionInfo[] connections)
     Adds connections for the suite being installed.
public synchronized  voidlistAlarms(AlarmsConsumer alarmsLister)
     Lists all alarms.
public synchronized  voidlistConnections(ConnectionsConsumer connectionsLister)
     Lists all registered connections.
public synchronized  voidremoveAlarm(int midletSuiteID, String midlet)
     Removes an alarm.
public synchronized  voidremoveConnection(int midletSuiteID, JUMPConnectionInfo connection)
     Removes registered connection.
public synchronized  voidremoveConnections(int midletSuiteID)
     Removes all registered connections.

Field Detail
ALARMS_DIR
final static String ALARMS_DIR(Code)
Dir to store alarms.



CONNECTIONS_DIR
final static String CONNECTIONS_DIR(Code)
Dir to store connections.




Constructor Detail
Store
public Store(StoreOperationManager storeManager) throws IOException(Code)
Constructs a Store and reads the data.
Parameters:
  storeManager - JUMP content store manager to use
throws:
  IOException - if IO fails




Method Detail
addAlarm
public synchronized void addAlarm(int midletSuiteID, String midlet, long time) throws IOException(Code)
Adds an alarm.
Parameters:
  midletSuiteID - MIDlet suite to add alarm for
Parameters:
  midlet - MIDlet class name
Parameters:
  time - alarm time
throws:
  IOException - if the content store failed



addConnection
public synchronized void addConnection(int midletSuiteID, JUMPConnectionInfo connection) throws IOException(Code)
Adds new registered connection.

Precondition: connection MUST not be already registered (the method doesn't check it)


Parameters:
  midletSuiteID - ID of MIDlet suite to registerconnection for
Parameters:
  connection - Connection to register
throws:
  IOException - if the content store failed to perform operation



addConnections
public synchronized void addConnections(int midletSuiteID, JUMPConnectionInfo[] connections) throws IOException(Code)
Adds connections for the suite being installed.

Preconditin: connection MUST not be already registered (the method doesn't check it)


Parameters:
  midletSuiteID - ID of MIDlet suite to registerconnection for
Parameters:
  connections - Connections to register
throws:
  IOException - if the content store failed to perform operation



listAlarms
public synchronized void listAlarms(AlarmsConsumer alarmsLister)(Code)
Lists all alarms.
Parameters:
  alarmsLister - connection lister



listConnections
public synchronized void listConnections(ConnectionsConsumer connectionsLister)(Code)
Lists all registered connections.
Parameters:
  connectionsLister - connection lister



removeAlarm
public synchronized void removeAlarm(int midletSuiteID, String midlet) throws IOException(Code)
Removes an alarm.
Parameters:
  midletSuiteID - MIDlet suite to remove alarm for
Parameters:
  midlet - MIDlet class name
throws:
  IOException - if the content store failed



removeConnection
public synchronized void removeConnection(int midletSuiteID, JUMPConnectionInfo connection) throws IOException(Code)
Removes registered connection.

Preconditin: connection MUST have been already registered (the method doesn't check it)

NB: throws IOException was intentionally removed from the signature: it's resonsibility of Store to ensure removal of all connections.


Parameters:
  midletSuiteID - ID of MIDlet suite to removeconnection for
Parameters:
  connection - Connection to remove
throws:
  IOException - if the content store failed to perform operation



removeConnections
public synchronized void removeConnections(int midletSuiteID) throws IOException(Code)
Removes all registered connections.

Preconditin: connection MUST have been already registered (the method doesn't check it)

NB: throws IOException was intentionally removed from the signature: it's resonsibility of Store to ensure removal of all connections.


Parameters:
  midletSuiteID - ID of MIDlet suite to removeconnections for
throws:
  IOException - if the content store failed



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)

w_w_w_._j__a_v__a_2_s.__c___o__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.