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


java.lang.Object
   com.uwyn.rife.continuations.basic.BasicContinuableRunner

All known Subclasses:   com.uwyn.rife.continuations.ContinuableRunnerTest,
BasicContinuableRunner
public class BasicContinuableRunner (Code)
Basic implementation of a 'continuable runner' that will execute the continuable objects and correctly handle the continuations-related exceptions that are triggered.

This runner is probably only applicable to the most simple of use-cases, but by reading its source it should be relatively easy to adapt of extend it for purposes that don't fall inside its scope.
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3850 $
since:
   1.6




Constructor Summary
public  BasicContinuableRunner(ContinuationConfigInstrument configInstrument)
     Create a new runner instance.
public  BasicContinuableRunner(ContinuationConfigInstrument configInstrument, ClassLoader classloader)
     Create a new runner instance with a custom classloader.

Method Summary
public  Stringanswer(String continuationId, Object callAnswer)
     Resumes the execution of a call continuation.
public  voidbeforeExecuteEntryMethodHook(ContinuableObject object)
     Hook method that will be executed right before executing the entry method of a continuable object, when the default implementation of BasicContinuableRunner.executeContinuable  is used.
public  BasicContinuableRunnercallTargetRetriever(CallTargetRetriever callTargetRetriever)
     Sets the call target retriever that will be used when a call continuation is triggered.
public  BasicContinuableRunnercloneContinuations(boolean cloneContinuations)
     Configures the runner to clone continuations or not.
public  voidexecuteContinuable(ContinuableObject object)
     Executes the continuable object by looking up the entrance method and invoking it.
public  CallTargetRetrievergetCallTargetRetriever()
     Retrieves the call target retriever that will be used when a call continuation is triggered.
public  ClassLoadergetClassLoader()
     Retrieves the classloader that is used by this runner.
public  booleangetCloneContinuations()
     Indicates whether continuations should be cloned when they are resumed.
public  ContinuationConfigInstrumentgetConfigInstrumentation()
     Retrieves the instrumentation configuration that is used by this runner.
public  ContinuableObjectgetCurrentContinuable()
     Retrieves the continuable that is active for the executing thread.
public  ContinuationManagergetManager()
     Retrieves the manager that is used by the continuation runner.
public  Stringresume(String continuationId)
     Resumes the execution of a paused continuation.
public  Stringrun(String continuationId)
     Executes a continuation whether it's paused or not.
public  voidsetCallTargetRetriever(CallTargetRetriever callTargetRetriever)
     Sets the call target retriever that will be used when a call continuation is triggered.
public  voidsetCloneContinuations(boolean cloneContinuations)
     Configures the runner to clone continuations or not.
public  Stringstart(String className)
     Starts the execution of a new instance of the provided class.


Constructor Detail
BasicContinuableRunner
public BasicContinuableRunner(ContinuationConfigInstrument configInstrument)(Code)
Create a new runner instance.
Parameters:
  configInstrument - the instance of the instrumentationconfiguration that will be used for the transformation
since:
   1.6



BasicContinuableRunner
public BasicContinuableRunner(ContinuationConfigInstrument configInstrument, ClassLoader classloader)(Code)
Create a new runner instance with a custom classloader.
Parameters:
  configInstrument - the instance of the instrumentationconfiguration that will be used for the transformation
Parameters:
  classloader - the classloader that will be used to load thecontinuable classes, this is for example an instance ofBasicContinuableClassLoader
since:
   1.6




Method Detail
answer
public String answer(String continuationId, Object callAnswer) throws Throwable(Code)
Resumes the execution of a call continuation.
Parameters:
  continuationId - the ID of the continuation that will be resumed
Parameters:
  callAnswer - the call answer object the ID of the resulting paused continuation; or

null if no continuation was paused or if the provided IDcouldn't be found
throws:
  Throwable - when an error occurs
since:
   1.6.1




beforeExecuteEntryMethodHook
public void beforeExecuteEntryMethodHook(ContinuableObject object)(Code)
Hook method that will be executed right before executing the entry method of a continuable object, when the default implementation of BasicContinuableRunner.executeContinuable  is used.

This can for example be used to inject a continuable support object in case the main continuable class only implements the marker interface without having any of the support methods (see ContinuationConfigInstrument.getContinuableSupportClassName ).
Parameters:
  object - the continuable object that will be executed
See Also:   BasicContinuableRunner.executeContinuable
since:
   1.6




callTargetRetriever
public BasicContinuableRunner callTargetRetriever(CallTargetRetriever callTargetRetriever)(Code)
Sets the call target retriever that will be used when a call continuation is triggered.
Parameters:
  callTargetRetriever - the call target retriever that will be used this runner instance
See Also:   BasicContinuableRunner.setCallTargetRetriever
See Also:   BasicContinuableRunner.getCallTargetRetriever
since:
   1.6



cloneContinuations
public BasicContinuableRunner cloneContinuations(boolean cloneContinuations)(Code)
Configures the runner to clone continuations or not.
Parameters:
  cloneContinuations - true if continuations should becloned when they are resumed; or

false if they should not be cloned this runner instance
See Also:   BasicContinuableRunner.setCloneContinuations
See Also:   BasicContinuableRunner.getCloneContinuations
since:
   1.6




executeContinuable
public void executeContinuable(ContinuableObject object) throws Throwable(Code)
Executes the continuable object by looking up the entrance method and invoking it.

This method can be overridden in case the default behavior isn't approriate.
Parameters:
  object - the continuatioble that will be executed
throws:
  Throwable - when an unexpected error occurs
since:
   1.6.1




getCallTargetRetriever
public CallTargetRetriever getCallTargetRetriever()(Code)
Retrieves the call target retriever that will be used when a call continuation is triggered. this runner's call target retriever
See Also:   BasicContinuableRunner.callTargetRetriever
See Also:   BasicContinuableRunner.setCallTargetRetriever
since:
   1.6



getClassLoader
public ClassLoader getClassLoader()(Code)
Retrieves the classloader that is used by this runner. this runner's classloader
since:
   1.6



getCloneContinuations
public boolean getCloneContinuations()(Code)
Indicates whether continuations should be cloned when they are resumed. true if continuations should be cloned when they areresumed; or

false if they should not be cloned
See Also:   BasicContinuableRunner.cloneContinuations
See Also:   BasicContinuableRunner.setCloneContinuations
since:
   1.6




getConfigInstrumentation
public ContinuationConfigInstrument getConfigInstrumentation()(Code)
Retrieves the instrumentation configuration that is used by this runner. this runner's instrumentation configuration
since:
   1.6



getCurrentContinuable
public ContinuableObject getCurrentContinuable()(Code)
Retrieves the continuable that is active for the executing thread. this thread's continuable; or

null if there's no current continuable
since:
   1.6




getManager
public ContinuationManager getManager()(Code)
Retrieves the manager that is used by the continuation runner. this runner's continuation manager
since:
   1.6



resume
public String resume(String continuationId) throws Throwable(Code)
Resumes the execution of a paused continuation.
Parameters:
  continuationId - the ID of the continuation that will be resumed the ID of the resulting paused continuation; or

null if no continuation was paused or if the provided IDcouldn't be found
throws:
  Throwable - when an error occurs
since:
   1.6




run
public String run(String continuationId) throws Throwable(Code)
Executes a continuation whether it's paused or not. This is supposed to only be used for answer continuations.
Parameters:
  continuationId - the ID of the existing continuation context thatwill be executed the ID of the resulting paused continuation; or

null if no continuation was paused or if the provided IDcouldn't be found
throws:
  Throwable - when an error occurs
since:
   1.6




setCallTargetRetriever
public void setCallTargetRetriever(CallTargetRetriever callTargetRetriever)(Code)
Sets the call target retriever that will be used when a call continuation is triggered.
Parameters:
  callTargetRetriever - the call target retriever that will be used
See Also:   BasicContinuableRunner.callTargetRetriever
See Also:   BasicContinuableRunner.getCallTargetRetriever
since:
   1.6



setCloneContinuations
public void setCloneContinuations(boolean cloneContinuations)(Code)
Configures the runner to clone continuations or not.
Parameters:
  cloneContinuations - true if continuations should becloned when they are resumed; or

false if they should not be cloned
See Also:   BasicContinuableRunner.cloneContinuations
See Also:   BasicContinuableRunner.getCloneContinuations
since:
   1.6




start
public String start(String className) throws Throwable(Code)
Starts the execution of a new instance of the provided class.
Parameters:
  className - the name of the class that will be executed the ID of the resulting paused continuation; or

null if no continuation was paused
throws:
  Throwable - when an error occurs
since:
   1.6




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.