RE: [jade-develop] Agent search DFService.search


Subject: RE: [jade-develop] Agent search DFService.search
From: Bellifemine Fabio (Fabio.Bellifemine@TILAB.COM)
Date: Tue Jan 28 2003 - 08:34:56 MET


I guess the problem is just the fact that you put 0 as the value of max-results, i.e. you are asking the DF for at maximum 0 results ...

> -----Original Message-----
> From: sri eswari devi [mailto:eswaris_99@yahoo.com]
> Sent: 27 January 2003 07:33
> To: jade
> Subject: [jade-develop] Agent search DFService.search
>
>
> hi jaders,
>
> I have problem when I am using search method in
> DFService..i.e I am having one agent in j2SE and
> another agent in J2ME (leap)..From J2ME am searching
> for the agents..I have written the code like this in
> the search--.
>
>
> DFAgentDescription df = new DFAgentDescription();
> ServiceDescription sd = new
> ServiceDescription();
> sd.setType("lookup");
> df.addServices(sd);
> try {
>
> SearchConstraints sc=new SearchConstraints();
> DFAgentDescription[] res =
> DFService.search(myAgent,getAID(), df,sc);
> Long l=new Long(0);
> sc.setMaxResults(l);
> //DFAgentDescription[] res =
> DFService.search(myAgent,df);
> //get the first occurence:
> System.out.println("Search result is "+res.length);
> AID tmp = (AID)res[0].getName();
> System.out.println(tmp);
> } catch (Exception e) {
> e.printStackTrace();
> }
>
> ............
> When I am using SearchConstriants constructor I am not
> getting the response...
> DFAgentDescription[] res =
> DFService.search(myAgent,getAID(), df,sc);
>
> But the same thing when I am using with out
> SearchConstraints is working fine..
> DFAgentDescription[] res =
> DFService.search(myAgent,df);
>
> Can anyone help me in using SearchConstraints...
>
> esh.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> _______________________________________________
> jade-develop mailing list
> jade-develop@sharon.cselt.it
> http://sharon.cselt.it/mailman/listinfo/jade-develop
> UNSUBSCRIBE INSTRUCTIONS AT
> http://jade.cselt.it/mailing.htm#unsubscribe
>



This archive was generated by hypermail 2a22 : Tue Jan 28 2003 - 08:34:59 MET