@Override
    public void body() {
        loadResourcesIDs();

        while (true)
        {
            printRuntimeMessage("Submitting next gridlets chunk...");
            int submittedCount = submitGridletsChunk();
            printRuntimeMessage(String.format("...%1$d gridlets submitted",
                    submittedCount));

            if (submittedCount == 0)
                break;

            printRuntimeMessage(String.format("Receiving %1$d gridlets...",
                    submittedCount));
            for (int i = 0; i < submittedCount; ++i){
                super.gridletReceive();

                // NOTE: Here we can write statistics for received gridlet
            }
            printRuntimeMessage("Received...");
        }

        super.shutdownGridStatisticsEntity();
        super.shutdownUserEntity();
        super.terminateIOEntities();

        GridSimRunTime.getInstance().getOutput().setTotalSimulationTime(GridSim.clock());
    }