DF Monitoring

View: New views
1 Messages — Rating Filter:   Alert me  

DF Monitoring

by minaSedaghat :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Dear jaders:
I have a problem in Monitoring my DF;
I have some agents register themselves to a DF;
and I wanna do a search On the DF after they registered;
But The DF service.Search() allways return NULL;
I really cant realize that the agents do not publish their services Correctky or there is
another problem;
i use the Code bellow;
 
// service Registeration ; Search IN USERNODE_Agent
 DFAgentDescription dfd=new DFAgentDescription();
                           dfd.setName(getAID());
                           ServiceDescription sd=new ServiceDescription();
                           sd.setType(Resource_Intro_Ontology.Resource);
                           sd.setName("Resource_Intro");
                     sd.addProperties(new Property(Resource_Intro_Ontology.Resource_CurrNodeLoad,CurrNodeLoad));
                             dfd.addServices(sd);
                           try{       
                           DFService.register(this,DF_ID,dfd);                            }
                           catch(FIPAException ex)
                           {
                               System.out.println(ex);
                           }                          
// Service Search; A Search in DF
             DFAgentDescription tempDf=new DFAgentDescription();
             ServiceDescription tempSd=new ServiceDescription();
             tempSd.setName("Resource_Intro");
             tempSd.setType(Resource_Intro_Ontology.Resource);
            tempDf.addServices(tempSd);
          
             DFAgentDescription[] result=DFService.search(this,tempDf);  
            
             for (int i=0;i<result.length;i++)
             {
              resultNode=result[i].getName();
        }
 
But "result"  allways return Null, although I am sure about the specific service had been published...
How can I check the DF to see what nodes are published their services and which kind of services;
 
Just a point ; I implement my search Function within the DF itself as a behavior ; Is this the thing that may cause the problem? and if so ; if I want the search to be done in the DFAgent itself , what should I do?
 
regards
Mina


_______________________________________________
jade-develop mailing list
jade-develop@...
https://avalon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm
LightInTheBox - Buy quality products at wholesale price