public void body() {
        // wait for a little while for about 10 seconds.
        // This to give a time for GridResource entities to register their
        // services to GIS (GridInformationService) entity.
        super.gridSimHold(10.0);
        double previous = 0;
        
        Iterator it = jobs.iterator();
        while(it.hasNext()) {
        	previous += secondsBetweenJobs;
        	
        	MessageBid bid = new MessageBid(0, AuctionTags.CONTINUOUS_DOUBLE_AUCTION, 
        			1, super.get_id()); 
        	
        	bid.setPrice(priceGenerator.sample());
        	bid.setAttribute("job", it.next());
        	
            super.send(broker.get_id(),
            		secondsBetweenJobs,
                    AuctionTags.AUCTION_PROPOSE, bid);
        }
        
        // hold for few period - few seconds since the Gridlets length are
        // quite huge for a small bandwidth
        super.gridSimHold(5);
        
        Object data;
        Gridlet gl;

        Sim_event ev = new Sim_event();
        while ( Sim_system.running() )
        {
            super.sim_get_next(ev);     // get the next available event
            data = ev.get_data();       // get the event's data

            // get the Gridlet data
            if (data != null && data instanceof Gridlet)
            {
                gl = (Gridlet) data;
                receiveJobs.add(gl);
            }

            // if all the Gridlets have been collected
            if (receiveJobs.size() == jobs.size()) {
                break;
            }
        }
        
        super.send(broker.get_id(), GridSimTags.SCHEDULE_NOW,
        					Broker.FINISHED_EXPERIMENTS);
		
        ////////////////////////////////////////////////////////
        // shut down I/O ports
        shutdownUserEntity();
        terminateIOEntities();
        

//        super.send(broker.get_id(), GridSimTags.SCHEDULE_NOW,
//            	GridSimTags.END_OF_SIMULATION);
    }