Java Doc for BlockingParticipant.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » rep » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.rep 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.uwyn.rife.rep.BlockingParticipant

All known Subclasses:   com.uwyn.rife.rep.participants.ParticipantSpringWeb,  com.uwyn.rife.rep.participants.ParticipantSite,  com.uwyn.rife.rep.participants.ParticipantDatasources,  com.uwyn.rife.rep.participants.ParticipantImages,  com.uwyn.rife.rep.participants.ParticipantConfig,  com.uwyn.rife.rep.BlockingParticipantDelegate,  com.uwyn.rife.rep.participants.ParticipantCursors,  com.uwyn.rife.rep.participants.ParticipantMemoryScheduler,  com.uwyn.rife.rep.participants.ParticipantMemoryUsers,  tutorial.numberguess.Site,
BlockingParticipant
abstract public class BlockingParticipant implements Participant,Runnable(Code)
A repository participant is basically a service that needs to be initialized before it can return objects that correspond to specified identification keys.

Each participant is launched in a seperate thread which is started to perform the initialization. This thread can run in parallel with the initializations of other participants. Whether this is the case is determined by the repository through the blocking parameter that has to be provided during the registration of the participant with the repository.
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3634 $
See Also:   Rep
since:
   1.0





Method Summary
protected  Object_getObject(Object key)
     Does the actual retrieval of an object from the participant according to a specified key.
protected  Object_getObject()
    
protected  voidcleanup()
     Performs the actual cleanup actions for the participant.
public  StringgetCleanupMessage()
     Returns a message that is supposed to describe the cleanup of this participant.
public  StringgetInitializationMessage()
     Returns a message that is supposed to describe the initialization of this participant.
public  StringgetName()
     Retrieves the name of the thread.
final public  ObjectgetObject()
     Returns the default object for this participant.
final public  ObjectgetObject(Object key)
     Retrieves the object from the participant that corresponds to a particular key.

If the initialization of the participant hasn't finished yet, the thread that executes this method will be suspended and woken up when the initialization finishes.
Parameters:
  key - An Object instance that used as the key toobtain a corresponding object from the participant with.

public  StringgetParameter()
     Retrieves the optional parameter.
public  BlockingRepositorygetRepository()
     Retrieves the repository that this participant belongs to.
public  ResourceFindergetResourceFinder()
     Retrieves the resource finder that is used during the initialization.
 ThreadgetThread()
    
public  booleanhadInitializationError()
     Checks if the initialization of this participant threw an error.
abstract protected  voidinitialize()
     Performs the actual initialization actions for the participant.
final public  booleanisFinished()
     Checks if the initialization of this participant is finished.
final public  voidrun()
     Starts the initialization.
public  voidsetCleanupMessage(String message)
     Overrides the default message that describes the cleanup of this participant.
public  voidsetInitializationMessage(String message)
     Overrides the default message that describes the initialization of this participant.
 voidsetName(String name)
     Sets the name of the thread.
public  voidsetParameter(String parameter)
     Sets the optional parameter.
 voidsetRepository(BlockingRepository repository)
     Sets the repository that this participant belongs to.
public  voidsetResourceFinder(ResourceFinder resourceFinder)
     Sets the resource finder that can be used during the initialize() method.
 voidsetThread(Thread thread)
    
final public  voidwaitUntilFinished()
     Makes the calling thread wait until the initialization of this participant has finished.



Method Detail
_getObject
protected Object _getObject(Object key)(Code)
Does the actual retrieval of an object from the participant according to a specified key. This method needs to be implemented by every participant that provides access to data, by default it just returns null.
Parameters:
  key - An Object instance that is used as the key toobtain a corresponding object from the participant with. null if no object could be found that correspondsto the provided key; or

an Object instance that corresponds to the provided key
See Also:   BlockingParticipant.getObject()
See Also:   BlockingParticipant.getObject(Object)
since:
   1.0




_getObject
protected Object _getObject()(Code)



cleanup
protected void cleanup()(Code)
Performs the actual cleanup actions for the participant. This is method can be overridden when a participant needs to customize the cleanup..
since:
   1.0



getCleanupMessage
public String getCleanupMessage()(Code)
Returns a message that is supposed to describe the cleanup of this participant. If no message has been set with setCleanupMessage(String message), a default message is generated. A String containing the message that describes thecleanup of this participant.
See Also:   BlockingParticipant.setCleanupMessage(String)
since:
   1.0



getInitializationMessage
public String getInitializationMessage()(Code)
Returns a message that is supposed to describe the initialization of this participant. If no message has been set with setInitializationMessage(String message), a default message is generated. A String containing the message that describes theinitialization of this participant.
See Also:   BlockingParticipant.setInitializationMessage(String)
since:
   1.0



getName
public String getName()(Code)
Retrieves the name of the thread.
since:
   1.0



getObject
final public Object getObject()(Code)
Returns the default object for this participant.

If the initialization of the participant hasn't finished yet, the thread that executes this method will be suspended and woken up when the initialization finishes. null if no default object exists; or

an Object instance containing the default object
See Also:   BlockingParticipant.getObject(Object)
See Also:   BlockingParticipant._getObject(Object)
since:
   1.0




getObject
final public Object getObject(Object key)(Code)
Retrieves the object from the participant that corresponds to a particular key.

If the initialization of the participant hasn't finished yet, the thread that executes this method will be suspended and woken up when the initialization finishes.
Parameters:
  key - An Object instance that used as the key toobtain a corresponding object from the participant with. null if no object could be found that correspondsto the provided key; or

the requested Object instance
See Also:   BlockingParticipant.getObject()
See Also:   BlockingParticipant._getObject(Object)
since:
   1.0




getParameter
public String getParameter()(Code)
Retrieves the optional parameter. null if no parameter was provided; or

the requested parameter String instance otherwise
since:
   1.0




getRepository
public BlockingRepository getRepository()(Code)
Retrieves the repository that this participant belongs to.
since:
   1.0



getResourceFinder
public ResourceFinder getResourceFinder()(Code)
Retrieves the resource finder that is used during the initialization. null if no resource finder was provided or if themethod was called after the initialization; or

the requested ResourceFinder instance otherwise
See Also:   BlockingParticipant.setResourceFinder(ResourceFinder)
since:
   1.0




getThread
Thread getThread()(Code)



hadInitializationError
public boolean hadInitializationError()(Code)
Checks if the initialization of this participant threw an error. true if the initialization threw an error; or

false if the initialization was successful
since:
   1.0




initialize
abstract protected void initialize()(Code)
Performs the actual initialization actions for the participant. This is an abstract method that needs to be implemented by every participant.
since:
   1.0



isFinished
final public boolean isFinished()(Code)
Checks if the initialization of this participant is finished. true if the initialization is finished; or

false if the initialization is in progress
since:
   1.0




run
final public void run()(Code)
Starts the initialization.
since:
   1.0



setCleanupMessage
public void setCleanupMessage(String message)(Code)
Overrides the default message that describes the cleanup of this participant.
Parameters:
  message - A String containing the message.
See Also:   BlockingParticipant.getCleanupMessage()
since:
   1.0



setInitializationMessage
public void setInitializationMessage(String message)(Code)
Overrides the default message that describes the initialization of this participant.
Parameters:
  message - A String containing the message.
See Also:   BlockingParticipant.getInitializationMessage()
since:
   1.0



setName
void setName(String name)(Code)
Sets the name of the thread.
Parameters:
  name - The name of the thread.
since:
   1.0



setParameter
public void setParameter(String parameter)(Code)
Sets the optional parameter.
Parameters:
  parameter - A String containing the optionalparameter for this participant.
since:
   1.0



setRepository
void setRepository(BlockingRepository repository)(Code)
Sets the repository that this participant belongs to.
Parameters:
  repository - an instance of BlockingRepository
See Also:   BlockingRepository
since:
   1.0



setResourceFinder
public void setResourceFinder(ResourceFinder resourceFinder)(Code)
Sets the resource finder that can be used during the initialize() method.
Parameters:
  resourceFinder - A ResourceFinder instance containingthe resource finder that is used during the initialization of therepository and its participants.
See Also:   BlockingParticipant.getResourceFinder()
since:
   1.0



setThread
void setThread(Thread thread)(Code)



waitUntilFinished
final public void waitUntilFinished()(Code)
Makes the calling thread wait until the initialization of this participant has finished.
since:
   1.0



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.