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


java.lang.Object
   com.sun.midp.links.LinkPortal

LinkPortal
public class LinkPortal (Code)
This class provides foreign methods of the Isolate class. (For discussion of foreign methods, see Fowler, _Refactoring_, "Introduce Foreign Method", p. 162.) The technique for passing links between isolates is implemented as a separate class in order to avoid short term dependencies on the implementation of the Isolate class in CLDC. These functions will eventually be moved to the Isolate class of CLDC. IMPL_NOTE The current arrangement is highly problematic and therefore should be considered only as a temporary solution. The portal keeps track of links by isolate ID. However, an isolate ID is only assigned after the isolate has been started. Therefore, getLinks() must block until the parent isolate has had a chance to call setLinks(). The sender and receiver must agree to pass this initial set of links. This is pretty fragile, but it's only necessary for passing the initial set of links. Any additional links can be passed via the initial set of links. If an isolate dies before it gets its links, they'll be stranded in the portal. The parent isolate can overwrite them, though, and they should be collected. Worse, if an isolate dies and another isolate is created and gets the same IDs, it can get the links that were destined for the first. This requires the parent isolate to be responsible for cleaning up any unused links passed to its children, which could be difficult in general.




Method Summary
public static synchronized  Link[]getLinks()
     Gets the links for this isolate that had been set by its creator.
public static  voidsetLinks(Isolate isolate, Link[] linkarray)
     Sets the array of links for the given isolate.



Method Detail
getLinks
public static synchronized Link[] getLinks()(Code)
Gets the links for this isolate that had been set by its creator. If links are available, this returns immediately. If no links are available, this method will block until the creator sets them. This requires close cooperation between the creator isolate and the newly created isolate. The typical usage is that the creator creates the new isolate and passes one set of links to it, and the first thing the new new isolate does is to get this initial set of links. Any subsequent links should be passed through the initial set of links.



setLinks
public static void setLinks(Isolate isolate, Link[] linkarray)(Code)
Sets the array of links for the given isolate. Once set, the array of links can be retrieved by the designated isolate using the getLinks() method. Setting of links should be done after the isolate is started and before it terminates, so that a valid id is available. However, this introduces a race condition between the starting of the isolate, the call to setLinks(), and the new isolate calling getLinks(). This means that the new isolate code will need to call getLinks() until it gets the array of links it expects. The linkarray parameter may be null, in which case it removes any links that had been previously set for isolate. If getLinks() is called at this point, it will block until a non-null array is set. Passing a null linkarray to setLinks() differs from passing a zero-length array, which will satisfy a call to getLinks() and cause it to return a zero-length array. If linkarray is an array whose length is greater than zero, every entry must be a valid (non-null) Link object.
throws:
  NullPointerException - if isolate is null
throws:
  NullPointerException - if any entry in linkarray is null
throws:
  IllegalArgumentException - if any link in linkarray is closed
throws:
  IllegalStateException - if isolate hasn't been started or has been terminated



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.