0

I am working in Eclipse, and I am trying to capture which agent (JADE agents) has been registered in the Directory Facilitator by using Aspect j. I tried this code, but it seems that it is showing some errors:

pointcut myreg() : call(public * jade.domain.DFService.register(..));
before() : myreg(){
String name = ((MyAgent)(thisJoinPoint.getTarget())).getAID().getName();
    System.out.println(name+" called DFService.register(..)");
}
Mike Causer
  • 8,196
  • 2
  • 43
  • 63
steevn
  • 242
  • 2
  • 8
  • i think i found it, we should write getThis() instead of getTarget(), but i don't know the difference between them !!!! – steevn Mar 03 '15 at 17:31
  • I guess this one is kind of a duplicate of one of your other questions. I have already answered it [here](http://stackoverflow.com/a/29063247/1082681) and you have accepted the answer. So please delete this question. Thanks. – kriegaex Mar 29 '15 at 20:15

0 Answers0