@@ -0,0 +1,2607 @@
+package com.cloud.resource;%0D%0A%0D%0Aimport java.net.URI;%0D%0Aimport java.util.List;%0D%0Aimport java.util.Map;%0D%0A%0D%0Aimport com.cloud.host.HostVO;%0D%0A%0D%0Apublic interface ResourceListener %7B%0D%0A    static final Integer EVENT_DISCOVER_BEFORE = 0x1;%0D%0A    static final Integer EVENT_DISCOVER_AFTER = 0x1 %3C%3C 1;%0D%0A    static final Integer EVENT_DELETE_HOST_BEFORE = 0x1 %3C%3C 2;%0D%0A    static final Integer EVENT_DELETE_HOST_AFTER = 0x1 %3C%3C 3;%0D%0A    static final Integer EVENT_CANCEL_MAINTENANCE_BEFORE = 0x1 %3C%3C 4;%0D%0A    static final Integer EVENT_CANCEL_MAINTENANCE_AFTER = 0x1 %3C%3C 5;%0D%0A    static final Integer EVENT_PREPARE_MAINTENANCE_BEFORE = 0x1 %3C%3C 6;%0D%0A    static final Integer EVENT_PREPARE_MAINTENANCE_AFTER = 0x1 %3C%3C 7;%0D%0A    static final Integer EVENT_ALL = (EVENT_DISCOVER_BEFORE %7C EVENT_DISCOVER_AFTER %7C EVENT_DELETE_HOST_BEFORE %7C EVENT_DELETE_HOST_AFTER%0D%0A            %7C EVENT_CANCEL_MAINTENANCE_BEFORE %7C EVENT_CANCEL_MAINTENANCE_AFTER %7C EVENT_PREPARE_MAINTENANCE_BEFORE %7C EVENT_PREPARE_MAINTENANCE_AFTER);%0D%0A%0D%0A    String getName();%0D%0A    %0D%0A    /**%0D%0A     * %0D%0A     * @param dcid%0D%0A     * @param podId%0D%0A     * @param clusterId%0D%0A     * @param uri%0D%0A     * @param username%0D%0A     * @param password%0D%0A     * @param hostTags%0D%0A     * %0D%0A     * Called before Discover.find()%0D%0A     */%0D%0A    void processDiscoverEventBefore(Long dcid, Long podId, Long clusterId, URI uri, String username, String password, List%3CString%3E hostTags);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param resources%0D%0A     * %0D%0A     * Called after Discover.find()%0D%0A     */%0D%0A    void processDiscoverEventAfter(Map%3C? extends ServerResource, Map%3CString, String%3E%3E resources);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param host%0D%0A     * %0D%0A     * Called before host delete%0D%0A     */%0D%0A    void processDeleteHostEventBefore(HostVO host);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param host%0D%0A     * %0D%0A     * Called after host delete. NOTE param host includes stale data which has been removed from database%0D%0A     */%0D%0A    void processDeletHostEventAfter(HostVO host);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param hostId%0D%0A     * %0D%0A     * Called before AgentManager.cancelMaintenance%0D%0A     */%0D%0A    void processCancelMaintenaceEventBefore(Long hostId);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param hostId%0D%0A     * %0D%0A     * Called after AgentManager.cancelMaintenance%0D%0A     */%0D%0A    void processCancelMaintenaceEventAfter(Long hostId);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param hostId%0D%0A     * %0D%0A     * Called before AgentManager.main%0D%0A     */%0D%0A    void processPrepareMaintenaceEventBefore(Long hostId);%0D%0A%0D%0A    /**%0D%0A     * %0D%0A     * @param hostId%0D%0A     * %0D%0A     * Called after AgentManager.main%0D%0A     */%0D%0A    void processPrepareMaintenaceEventAfter(Long hostId);%0D%0A%7D%0D%0A

Introduce new resource life cycle listener