[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[aspectj-users] Network application (WhiteDog)
|
- From: NAKAGUCHI Takao <takao-n@xxxxxxxxxxxxxxx>
- Date: Thu, 29 May 2003 14:27:06 +0900
- Delivered-to: aspectj-users@eclipse.org
I used AspectJ for network system (named WhiteDog) that enables
object-sharing via network.
http://untrod.keihanna.ne.jp/whitedog/index_en.html
(demo applets and Aspect codes available)
here is the sample Aspect Code enabling object-sharing.
-- ShinkeiSuijakuAspect.aj --
import java.applet.Applet;
public aspect ShinkeiSuijakuAspect extends AbstractAppletAspect{
before(): execution(void ShinkeiSuijaku.init()){
applet_ = (Applet)thisJoinPoint.getTarget();
registerObject("object.ShinkeiSuijaku", applet_);
}
public void ShinkeiSuijaku.start(){}
after(): execution(void ShinkeiSuijaku.start()){
connect(applet_.getCodeBase().getHost(), 12539);
}
public void ShinkeiSuijaku.stop(){}
after(): execution(void ShinkeiSuijaku.stop()){
close();
}
pointcut concernedMethodsExecution():
execution(void ShinkeiSuijaku.mouseReleased(..))
|| execution(void ShinkeiSuijaku.mousePressed(..));
private Applet applet_;
}
----
Applying this Aspect Code to ShinkeiSuijaku(memory game) applet,
the applet can be shared via network.
takao.