private void handleCancelList(Sim_event ev)
    {
        boolean success = false;
        int tag = -1;
        int src = 0;

        try
        {
            // [0]=reservID, [1]=list of Gridlet IDs, [2]=transID, [3]=senderID
            Object[] obj = ( Object[] ) ev.get_data();

            // get the data inside an array
            int reservationID = ( (Integer) obj[0] ).intValue();
            ArrayList list = (ArrayList) obj[1];
            int transactionID = ( (Integer) obj[2] ).intValue();
            src = ( (Integer) obj[3] ).intValue();

            // tag = return tag + transaction id
            int returnTag = GridSimTags.RETURN_AR_CANCEL;
            tag = returnTag + transactionID;

            // check whether this resource can support AR or not
            success = checkResourceType(src, returnTag, transactionID,
                            GridSimTags.AR_CANCEL_ERROR_RESOURCE_CANT_SUPPORT,
                            "can't cancel a reservation");

            // if list is empty
            if (list == null) {
                success = false;
            }

            // if successful
            if (success) {
                ( (ARPolicy) policy_).handleCancelReservation(reservationID,
                                      src, list, 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 cancel a "+
                               "new reservation.");

            super.send(src, 0.0, GridSimTags.RETURN_AR_CANCEL,
                new IO_data(new Integer(GridSimTags.AR_CANCEL_ERROR),SIZE,src));
        }
    }