private void handleQueryReservation(Sim_event ev)
    {
        int src = -1;   // the sender id
        boolean success = false;
        int tag = -1;

        try
        {
            // id[0] = resID, [1] = reservID, [2] = trans ID, [3] = sender ID
            int[] obj = ( int[] ) ev.get_data();
            int reservID = obj[1];     // get the reservation ID
            src = obj[3];    // get the sender ID

            int returnTag = GridSimTags.RETURN_AR_QUERY_STATUS;
            tag = returnTag + obj[2];  // return tag + transaction ID

            // check whether this resource can support AR or not
            success = checkResourceType(src, returnTag, obj[2],
                      GridSimTags.AR_STATUS_ERROR, "can't query a reservation");

            // if this resource doesn't support AR then exit
            if (!success) {
                return;
            }
            else {
                ((ARPolicy) policy_).handleQueryReservation(reservID, src, tag);
            }
        }
        catch (ClassCastException c) {
            success = false;
        }
        catch (Exception e) {
            success = false;
        }

        // if there is an exception, then send back an error msg
        if (!success && tag != -1)
        {
            System.out.println(super.get_name() + " : Error - can't query a " +
                  "new reservation.");

            super.send( src, 0.0, GridSimTags.RETURN_AR_QUERY_STATUS,
                new IO_data(new Integer(GridSimTags.AR_STATUS_ERROR),SIZE,src));
        }
    }