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


java.lang.Object
   com.sun.midp.content.InvocationStore

InvocationStore
class InvocationStore (Code)
The store for pending Invocations. New Invocations are queued with InvocationStore.put method and retrieved with the InvocationStore.get method. The InvocationStore.cancel method is used to unblock calls to blocking InvocationStore.get methods.

Synchronization is performed by the native methods; access is serialized by the VM running in a single native thread and by NOT preempting native method calls. The native code uses the SNI ability to block a thread and unblock it at a later time. The implementation does not poll for requests but blocks, if requested, until it is unblocked.





Method Summary
static  voidcancel()
     Cancel a blocked InvocationStore.get or InvocationStore.listen method if it is blocked in the native code.
static  InvocationImplgetByTid(int tid, int relative)
     Get an Invocation from the store based on its tid.
static  InvocationImplgetCleanup(int suiteId, String classname)
     Performs cleanup for a ContentHandler by suiteId and classname.

Any marked InvocationStore.setCleanup invocations still in the queue are handled based on status:

  • ACTIVE Invocations are returned from this method so they can be have the ERROR status set and so the invoking application relaunched.
  • INIT Invocations are requeued to the invoking application with ERROR status.
static  InvocationImplgetRequest(int suiteId, String classname, boolean shouldBlock)
     Get a new InvocationImpl request from the store using a MIDlet suiteId and classname.
static  InvocationImplgetResponse(InvocationImpl invoc, int suiteId, String classname, boolean shouldBlock)
     Get a new InvocationImpl response from the store using a MIDlet suiteId and classname.
static  booleanlisten(int suiteId, String classname, boolean request, boolean shouldBlock)
     Listen for a matching invocation.
static  voidput(InvocationImpl invoc)
     Put a new Invocation into the store.
static  voidsetCleanup(int suiteId, String classname, boolean cleanup)
     Marks any existing invocations for the content handler.
static  voidsetListenNotify(int suiteId, String classname, boolean request)
     Reset the flags for requests or responses that are pending.
static  voidsetParams(InvocationImpl invoc)
     Updates the parameters of the invocation in the native store.
static  voidsetStatus(InvocationImpl invoc)
     Sets the status of an existing Invocation.
static  intsize()
     Return the number of invocations in the native queue.



Method Detail
cancel
static void cancel()(Code)
Cancel a blocked InvocationStore.get or InvocationStore.listen method if it is blocked in the native code.



getByTid
static InvocationImpl getByTid(int tid, int relative)(Code)
Get an Invocation from the store based on its tid. The normal state transitions and dispositions are NOT performed. If TID == 0 then the first tid is used as the reference. If TID == 0 and relative == 0 then null is returned. This method never waits.
Parameters:
  tid - the tid to fetch
Parameters:
  relative - -1, 0, +1 to get previous, equal, or next an InvocationImpl object if a matching tid was found;otherwise null



getCleanup
static InvocationImpl getCleanup(int suiteId, String classname)(Code)
Performs cleanup for a ContentHandler by suiteId and classname.

Any marked InvocationStore.setCleanup invocations still in the queue are handled based on status:

  • ACTIVE Invocations are returned from this method so they can be have the ERROR status set and so the invoking application relaunched.
  • INIT Invocations are requeued to the invoking application with ERROR status.
  • OK, CANCELLED, ERROR, or INITIATED Invocations are discrded.
  • HOLD status Invocations are retained pending completion of previous Invocation. TBD: Chained HOLDs...

Parameters:
  suiteId - the MIDletSuite ID
Parameters:
  classname - the classname InvocationImpl if any was found withthe same MIDlet suiteId and classname;null is returned if there is no matching Invocation



getRequest
static InvocationImpl getRequest(int suiteId, String classname, boolean shouldBlock)(Code)
Get a new InvocationImpl request from the store using a MIDlet suiteId and classname.
Parameters:
  suiteId - the MIDlet suiteId to search for,MUST not be null
Parameters:
  classname - to match, must not be null
Parameters:
  shouldBlock - true if the method should blockwaiting for an Invocation InvocationImpl if any was found withthe same MIDlet suiteId and classname withits status is set to ACTIVE;null is returned if there is no matching Invocation



getResponse
static InvocationImpl getResponse(InvocationImpl invoc, int suiteId, String classname, boolean shouldBlock)(Code)
Get a new InvocationImpl response from the store using a MIDlet suiteId and classname. The response is removed from the store.
Parameters:
  invoc - an InvocationImpl to fill with the response
Parameters:
  suiteId - the MIDletSuite ID
Parameters:
  classname - the classname
Parameters:
  shouldBlock - true if the method should blockwaiting for an Invocation InvocationImpl if any was found withthe same MIDlet suiteId and classname if one was requested;null is returned if there is no matching Invocation



listen
static boolean listen(int suiteId, String classname, boolean request, boolean shouldBlock)(Code)
Listen for a matching invocation. When a matching invocation is present, true is returned. Each Invocation instance is only returned once. After it has been returned once; it is ignored subsequently.
Parameters:
  suiteId - the MIDlet suiteId to search for,MUST not be null
Parameters:
  classname - to match, must not be null
Parameters:
  request - true to listen for a request; else a response
Parameters:
  shouldBlock - true if the method should blockwaiting for an Invocation true if a matching invocation is present; false otherwise



put
static void put(InvocationImpl invoc)(Code)
Put a new Invocation into the store. It can be modified by InvocationStore.setStatus . The TID (transaction ID) is updated with a newly assigned value.
Parameters:
  invoc - an InvocationImpl instance with the members properlyinitialized.
See Also:   InvocationStore.getRequest
See Also:   InvocationStore.getResponse



setCleanup
static void setCleanup(int suiteId, String classname, boolean cleanup)(Code)
Marks any existing invocations for the content handler. Any marked invocation will be modified by InvocationStore.getCleanup .
Parameters:
  suiteId - the suite to mark
Parameters:
  classname - the MIDlet within the suite
Parameters:
  cleanup - true to mark the Invocation forcleanup at exit



setListenNotify
static void setListenNotify(int suiteId, String classname, boolean request)(Code)
Reset the flags for requests or responses that are pending. Once reset, any pending requests or responses will be returned when listen0 is called.
Parameters:
  suiteId - the MIDlet suiteId to search for,MUST not be null
Parameters:
  classname - to match, must not be null
Parameters:
  request - true to reset request notification flags;else reset response notification flags



setParams
static void setParams(InvocationImpl invoc)(Code)
Updates the parameters of the invocation in the native store. The ID, URL, type, action, arguments, and data are stored again in native.
Parameters:
  invoc - an InvocationImpl previously retrieved with get



setStatus
static void setStatus(InvocationImpl invoc)(Code)
Sets the status of an existing Invocation. If the status is OK, CANCELLED, ERROR, or INITIATED and a response is required then the invocation is requeued to the invoking application; if no response is required the request is discarded and the transaction id (tid) is set to zero.
Parameters:
  invoc - an InvocationImpl previously retrieved with get



size
static int size()(Code)
Return the number of invocations in the native queue. the number of invocations in the native queue



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.