阅读背景:

如何有效地处理其他akka演员的反应

来源:互联网 

Consider this,

class PageActor extends UntypedActor {
private Page page;
private ActorRef documentActor;
public PDFPageActor(ActorRef pdfDocumentActor) {
    super();
    pdfPage = new PDFPage();
    this.pdfDocumentActor = pdfDocumentActor;
}
@Override
public void onReceive(Object message) throws Exception {
    // handle the message;
}
public void doProcess() {
  statement;
  statement;
  send a request to **Document actor**(requesting a object);
  statement(make use of the above object);
  statement;
  send a request to **Document actor**(requesting a object);        
  statement(make use of above object);
  statement;
  statement(make use of both the objects)
}
}
class PageActor extends Untype



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: