Permalink
Browse files

Changed JActor to version 4.6.0

  • Loading branch information...
1 parent 5f1144c commit c13ad2fe8fcba41cd04b2a9bb11ef66bdd5acca3 @laforge49 committed Dec 17, 2012
View
@@ -5,7 +5,7 @@
<groupId>org.agilewiki.jactor</groupId>
<artifactId>jactor</artifactId>
- <version>4.5.1</version>
+ <version>4.6.0</version>
<packaging>jar</packaging>
<name>JActor</name>
<description>Lock-free Java Actors</description>
View
@@ -4,7 +4,7 @@
<groupId>org.agilewiki.jactor</groupId>
<artifactId>jactor</artifactId>
- <version>4.5.1-SNAPSHOT</version>
+ <version>4.6.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>JActor</name>
<description>Lock-free Java Actors</description>
@@ -29,7 +29,7 @@
import org.agilewiki.jactor.lpc.Request;
import org.agilewiki.jactor.lpc.TargetActor;
-public class Continuation {
+public class Continuation<RESPONSE_TYPE> extends RP<RESPONSE_TYPE> {
private TargetActor targetActor;
private RP _rp;
@@ -38,7 +38,8 @@ public Continuation(TargetActor targetActor, RP _rp) {
this._rp = _rp;
}
- public void response(Object rsp) throws Exception {
+ @Override
+ public void processResponse(Object rsp) throws Exception {
(new ContinuationRequest(_rp, rsp)).sendEvent(targetActor);
}
@@ -35,20 +35,20 @@ public void processRequest(JLPCActor targetActor, RP rp) throws Exception {
class Driver extends JLPCActor {
void doit(RP<String> rp) {
- Continuation continuation = new Continuation(this, rp);
+ Continuation<String> continuation = new Continuation(this, rp);
Application applicatin = new Application();
applicatin.continuation = continuation;
applicatin.start();
}
}
class Application extends Thread {
- Continuation continuation;
+ Continuation<String> continuation;
@Override
public void run() {
try {
- continuation.response("Hello world!");
+ continuation.processResponse("Hello world!");
} catch (Exception ex) {
ex.printStackTrace();
}

0 comments on commit c13ad2f

Please sign in to comment.